From 5d2b6115f51ffe54b1a97fb8f46e1c762900d2c5 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Sat, 7 Dec 2024 21:25:18 -0500 Subject: [PATCH] Moving to api-v4 routes. --- src/api_routes_v3.rs | 3 --- src/api_routes_v4.rs | 9 +++++++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/api_routes_v3.rs b/src/api_routes_v3.rs index e0f51dcc4..1c6dac047 100644 --- a/src/api_routes_v3.rs +++ b/src/api_routes_v3.rs @@ -304,9 +304,6 @@ pub fn config(cfg: &mut ServiceConfig, rate_limit: &RateLimitCell) { scope("/user") .wrap(rate_limit.message()) .route("", get().to(read_person)) - .route("/content", get().to(list_person_content)) - // TODO move this to /account/saved after http routes - .route("/saved", get().to(list_person_saved)) .route("/mention", get().to(list_mentions)) .route( "/mention/mark_as_read", diff --git a/src/api_routes_v4.rs b/src/api_routes_v4.rs index b03be60f2..2a1082d2b 100644 --- a/src/api_routes_v4.rs +++ b/src/api_routes_v4.rs @@ -282,7 +282,8 @@ pub fn config(cfg: &mut ServiceConfig, rate_limit: &RateLimitCell) { .route("/change_password", put().to(change_password)) .route("/totp/generate", post().to(generate_totp_secret)) .route("/totp/update", post().to(update_totp)) - .route("/verify_email", post().to(verify_email)), + .route("/verify_email", post().to(verify_email)) + .route("/saved", get().to(list_person_saved)), ) .route("/account/settings/save", put().to(save_user_settings)) .service( @@ -318,7 +319,11 @@ pub fn config(cfg: &mut ServiceConfig, rate_limit: &RateLimitCell) { ), ) // User actions - .route("/person", get().to(read_person)) + .service( + scope("/person") + .route("", get().to(read_person)) + .route("/content", get().to(list_person_content)), + ) // Admin Actions .service( scope("/admin")