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 {