]> Untitled Git - lemmy.git/commitdiff
Put /admin/purge routes before /admin routes (#3244)
authorkartikynwa <kartik.ynwa@gmail.com>
Wed, 21 Jun 2023 20:32:06 +0000 (02:02 +0530)
committerGitHub <noreply@github.com>
Wed, 21 Jun 2023 20:32:06 +0000 (22:32 +0200)
src/api_routes_http.rs

index faf08938bd2458dcaff99b60e05dd8807c2740fb..a2abfa690f9b9d9b990a276528f11a175142b76e 100644 (file)
@@ -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())