Moving to api-v4 routes.

This commit is contained in:
Dessalines 2024-12-07 21:25:18 -05:00
parent a4de41ddae
commit 5d2b6115f5
2 changed files with 7 additions and 5 deletions

View file

@ -304,9 +304,6 @@ pub fn config(cfg: &mut ServiceConfig, rate_limit: &RateLimitCell) {
scope("/user") scope("/user")
.wrap(rate_limit.message()) .wrap(rate_limit.message())
.route("", get().to(read_person)) .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", get().to(list_mentions))
.route( .route(
"/mention/mark_as_read", "/mention/mark_as_read",

View file

@ -282,7 +282,8 @@ pub fn config(cfg: &mut ServiceConfig, rate_limit: &RateLimitCell) {
.route("/change_password", put().to(change_password)) .route("/change_password", put().to(change_password))
.route("/totp/generate", post().to(generate_totp_secret)) .route("/totp/generate", post().to(generate_totp_secret))
.route("/totp/update", post().to(update_totp)) .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)) .route("/account/settings/save", put().to(save_user_settings))
.service( .service(
@ -318,7 +319,11 @@ pub fn config(cfg: &mut ServiceConfig, rate_limit: &RateLimitCell) {
), ),
) )
// User actions // 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 // Admin Actions
.service( .service(
scope("/admin") scope("/admin")