Compare commits
2 Commits
7cb6b94b08
...
c8c430fe7f
| Author | SHA1 | Date | |
|---|---|---|---|
| c8c430fe7f | |||
| ec0e24db8d |
@@ -25,6 +25,9 @@ pub fn router() -> Router<AppState> {
|
|||||||
get(users::get_me_following_list),
|
get(users::get_me_following_list),
|
||||||
)
|
)
|
||||||
.route("/users/me/top-friends", put(social::put_top_friends))
|
.route("/users/me/top-friends", put(social::put_top_friends))
|
||||||
|
// /users/{username} is owned by the AP router (returns AP actor JSON for federation).
|
||||||
|
// The REST user profile lives at /users/{username}/profile to avoid the conflict.
|
||||||
|
.route("/users/{username}/profile", get(users::get_user))
|
||||||
.route(
|
.route(
|
||||||
"/users/{username}/top-friends",
|
"/users/{username}/top-friends",
|
||||||
get(social::get_top_friends_handler),
|
get(social::get_top_friends_handler),
|
||||||
|
|||||||
@@ -187,7 +187,7 @@ export const getMeFollowingList = (token: string) =>
|
|||||||
// ── Users ─────────────────────────────────────────────────────────────────
|
// ── Users ─────────────────────────────────────────────────────────────────
|
||||||
|
|
||||||
export const getUserProfile = (username: string, token: string | null) =>
|
export const getUserProfile = (username: string, token: string | null) =>
|
||||||
apiFetch(`/users/${username}`, {}, UserSchema, token);
|
apiFetch(`/users/${username}/profile`, {}, UserSchema, token);
|
||||||
|
|
||||||
export const getFollowersList = (username: string, token: string | null) =>
|
export const getFollowersList = (username: string, token: string | null) =>
|
||||||
apiFetch(`/users/${username}/follower-list`, {}, z.object({ total: z.number(), items: z.array(UserSchema) }), token);
|
apiFetch(`/users/${username}/follower-list`, {}, z.object({ total: z.number(), items: z.array(UserSchema) }), token);
|
||||||
|
|||||||
Reference in New Issue
Block a user