diff --git a/src/server.rs b/src/server.rs index a4ed2d3..4ac8bd2 100644 --- a/src/server.rs +++ b/src/server.rs @@ -202,7 +202,7 @@ impl FromRequest for CustomRequest { } /// Process a "simple request" aka not a WebSocket request -fn process_simple_route(route: &Route, req: &mut HttpRequestHandler) -> RequestResult { +async fn process_simple_route(route: &Route, req: &mut HttpRequestHandler) -> RequestResult { if requests_limit_helper::trigger_before(req, route).is_err() { req.too_many_requests("Too many request. Please try again later.")?; } @@ -279,7 +279,7 @@ async fn process_request(custom_req: CustomRequest) -> HttpResponse { // Execute the request let mut request = HttpRequestHandler::new(custom_req.req, custom_req.body); - match process_simple_route(route, &mut request) { + match process_simple_route(route, &mut request).await { // Set default error response if required Err(e) => {