From 0d6786ffe95bf6d2811d7ca44653380dde888984 Mon Sep 17 00:00:00 2001 From: JustTemmie <47639983+JustTemmie@users.noreply.github.com> Date: Sat, 12 Jul 2025 19:21:43 +0200 Subject: [PATCH] fix: add missing return calls to add and remove friend --- composables/api.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composables/api.ts b/composables/api.ts index 0cd6db0..11c2226 100644 --- a/composables/api.ts +++ b/composables/api.ts @@ -38,11 +38,11 @@ export const useApi = () => { } async function addFriend(username: string): Promise { - await fetchWithApi('/me/friends', { method: "POST", body: { username } }); + return await fetchWithApi('/me/friends', { method: "POST", body: { username } }); } async function removeFriend(userId: string): Promise { - await fetchWithApi(`/me/friends/${userId}`, { method: "DELETE" }); + return await fetchWithApi(`/me/friends/${userId}`, { method: "DELETE" }); } async function fetchMessages(channelId: string, options?: { amount?: number, offset?: number }): Promise {