From ef3544bac476552313b22864da99635e803cdbb4 Mon Sep 17 00:00:00 2001 From: kartikynwa Date: Thu, 22 Jun 2023 02:02:06 +0530 Subject: [PATCH] Put /admin/purge routes before /admin routes (#3244) --- src/api_routes_http.rs | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/api_routes_http.rs b/src/api_routes_http.rs index faf08938b..a2abfa690 100644 --- a/src/api_routes_http.rs +++ b/src/api_routes_http.rs @@ -335,16 +335,15 @@ pub fn config(cfg: &mut web::ServiceConfig, rate_limit: &RateLimitCell) { .route( "/registration_application/approve", web::put().to(route_post::), + ) + .service( + web::scope("/purge") + .route("/person", web::post().to(route_post::)) + .route("/community", web::post().to(route_post::)) + .route("/post", web::post().to(route_post::)) + .route("/comment", web::post().to(route_post::)), ), ) - .service( - web::scope("/admin/purge") - .wrap(rate_limit.message()) - .route("/person", web::post().to(route_post::)) - .route("/community", web::post().to(route_post::)) - .route("/post", web::post().to(route_post::)) - .route("/comment", web::post().to(route_post::)), - ) .service( web::scope("/custom_emoji") .wrap(rate_limit.message())