Skip to content

Commit 70f4cfc

Browse files
gautamg795Convex, Inc.
authored andcommitted
Refactor backend binary into library + modules + bin (#29845)
GitOrigin-RevId: 330ab124c9709dc23d219cda401adc63c18a4285
1 parent 5ca9d1c commit 70f4cfc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

crates/local_backend/src/router.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ pub fn storage_api_routes() -> Router<RouterState> {
238238
// IMPORTANT NOTE: Those routes are proxied by Usher. Any changes to the router,
239239
// such as adding or removing a route, or changing limits, also need to be
240240
// applied to `crates_private/usher/src/proxy.rs`.
241-
pub fn action_callback_routes(st: LocalAppState) -> Router<LocalAppState> {
241+
pub fn action_callback_routes<S>(st: LocalAppState) -> Router<S> {
242242
Router::new()
243243
.route("/query", post(internal_query_post))
244244
.route("/mutation", post(internal_mutation_post))
@@ -254,6 +254,7 @@ pub fn action_callback_routes(st: LocalAppState) -> Router<LocalAppState> {
254254
// All routes above this line get the increased limit
255255
.layer(DefaultBodyLimit::max(*MAX_BACKEND_RPC_REQUEST_SIZE))
256256
.layer(axum::middleware::from_fn_with_state(st.clone(), action_callbacks_middleware))
257+
.with_state(st)
257258
}
258259

259260
pub fn import_routes() -> Router<LocalAppState> {

0 commit comments

Comments
 (0)