]> Untitled Git - lemmy.git/blobdiff - src/api_routes_http.rs
feat: re-added captcha checks (#3249)
[lemmy.git] / src / api_routes_http.rs
index a2abfa690f9b9d9b990a276528f11a175142b76e..375630a9243fc529c7227740e600746d3e7c2d39 100644 (file)
@@ -38,6 +38,7 @@ use lemmy_api_common::{
     ChangePassword,
     DeleteAccount,
     GetBannedPersons,
+    GetCaptcha,
     GetPersonDetails,
     GetPersonMentions,
     GetReplies,
@@ -272,6 +273,12 @@ pub fn config(cfg: &mut web::ServiceConfig, rate_limit: &RateLimitCell) {
           .wrap(rate_limit.register())
           .route(web::post().to(route_post_crud::<Register>)),
       )
+      .service(
+        // Handle captcha separately
+        web::resource("/user/get_captcha")
+          .wrap(rate_limit.post())
+          .route(web::get().to(route_get::<GetCaptcha>)),
+      )
       // User actions
       .service(
         web::scope("/user")