]> Untitled Git - lemmy.git/blobdiff - src/api_routes.rs
Adding admin purging of DB items and pictures. #904 #1331 (#1809)
[lemmy.git] / src / api_routes.rs
index 36310386018cdf914ca11811ce37d7fda37036fd..c9ff8803c7c7a19aa40e390846b5c217ec901d4f 100644 (file)
@@ -232,6 +232,14 @@ pub fn config(cfg: &mut web::ServiceConfig, rate_limit: &RateLimit) {
             "/registration_application/approve",
             web::put().to(route_post::<ApproveRegistrationApplication>),
           ),
+      )
+      .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>)),
       ),
   );
 }