fix: add missing return calls to add and remove friend

This commit is contained in:
Twig 2025-07-12 19:21:43 +02:00
parent b731228fb8
commit 0d6786ffe9
No known key found for this signature in database

View file

@ -38,11 +38,11 @@ export const useApi = () => {
}
async function addFriend(username: string): Promise<void> {
await fetchWithApi('/me/friends', { method: "POST", body: { username } });
return await fetchWithApi('/me/friends', { method: "POST", body: { username } });
}
async function removeFriend(userId: string): Promise<void> {
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<MessageResponse[] | undefined> {