feat(presentation): GET /users/me, GET /users/{username}/thoughts, GET /tags/{name}

This commit is contained in:
2026-05-14 11:20:48 +02:00
parent e408a53136
commit 6082766935
3 changed files with 55 additions and 2 deletions

View File

@@ -20,7 +20,7 @@ pub fn router(fed_config: &ApFederationConfig) -> Router<AppState> {
.route("/auth/register", post(auth::post_register))
.route("/auth/login", post(auth::post_login))
// users — static paths before parameterised
.route("/users/me", patch(users::patch_profile))
.route("/users/me", get(users::get_me).patch(users::patch_profile))
.route("/users/me/top-friends", put(social::put_top_friends))
.route("/users/{username}/top-friends", get(social::get_top_friends_handler))
// follows & blocks (use {id} param)
@@ -54,6 +54,8 @@ pub fn router(fed_config: &ApFederationConfig) -> Router<AppState> {
.route("/feed", get(feed::home_feed))
.route("/feed/public", get(feed::public_feed))
.route("/search", get(feed::search_handler))
.route("/users/{username}/thoughts", get(feed::user_thoughts_handler))
.route("/tags/{name}", get(feed::tag_thoughts_handler))
// notifications
.route("/notifications", get(notifications::list_notifications))
.route("/notifications/read-all", post(notifications::mark_all_read))