From: kartikynwa <kartik.ynwa@gmail.com>
Date: Wed, 21 Jun 2023 20:32:06 +0000 (+0530)
Subject: Put /admin/purge routes before /admin routes (#3244)
X-Git-Url: http://these/git/readmes/%24%7B%60data:application/%24%7Bargs.pageFn.jump%20n%7D?a=commitdiff_plain;h=ef3544bac476552313b22864da99635e803cdbb4;p=lemmy.git

Put /admin/purge routes before /admin routes (#3244)
---

diff --git a/src/api_routes_http.rs b/src/api_routes_http.rs
index faf08938..a2abfa69 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::<ApproveRegistrationApplication>),
+          )
+          .service(
+            web::scope("/purge")
+              .route("/person", web::post().to(route_post::<PurgePerson>))
+              .route("/community", web::post().to(route_post::<PurgeCommunity>))
+              .route("/post", web::post().to(route_post::<PurgePost>))
+              .route("/comment", web::post().to(route_post::<PurgeComment>)),
           ),
       )
-      .service(
-        web::scope("/admin/purge")
-          .wrap(rate_limit.message())
-          .route("/person", web::post().to(route_post::<PurgePerson>))
-          .route("/community", web::post().to(route_post::<PurgeCommunity>))
-          .route("/post", web::post().to(route_post::<PurgePost>))
-          .route("/comment", web::post().to(route_post::<PurgeComment>)),
-      )
       .service(
         web::scope("/custom_emoji")
           .wrap(rate_limit.message())