From fe610c8b6f31348f188bba72f08dadf1111e6c30 Mon Sep 17 00:00:00 2001 From: Gabriel Kaszewski Date: Fri, 15 May 2026 19:30:17 +0200 Subject: [PATCH] fix(frontend): tag getTopFriends fetch --- thoughts-frontend/lib/api.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/thoughts-frontend/lib/api.ts b/thoughts-frontend/lib/api.ts index e3567f6..fd102a8 100644 --- a/thoughts-frontend/lib/api.ts +++ b/thoughts-frontend/lib/api.ts @@ -222,7 +222,12 @@ export const getFollowingList = (username: string, token: string | null) => apiFetch(`/users/${username}/following`, {}, z.object({ total: z.number(), items: z.array(UserSchema) }), token); export const getTopFriends = (username: string, token: string | null) => - apiFetch(`/users/${username}/top-friends`, {}, z.object({ topFriends: z.array(z.string()) }), token); + apiFetch( + `/users/${username}/top-friends`, + { next: { tags: [`profile:${username}`] } }, + z.object({ topFriends: z.array(z.string()) }), + token + ); export const followUser = (username: string, token: string) => apiFetch(`/users/${username}/follow`, { method: "POST" }, z.null(), token);