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

This commit is contained in:
kartikynwa 2023-06-22 02:02:06 +05:30 committed by GitHub
parent c9d1fec117
commit ef3544bac4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -335,15 +335,14 @@ pub fn config(cfg: &mut web::ServiceConfig, rate_limit: &RateLimitCell) {
.route(
"/registration_application/approve",
web::put().to(route_post::<ApproveRegistrationApplication>),
),
)
.service(
web::scope("/admin/purge")
.wrap(rate_limit.message())
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("/custom_emoji")