fix: add missing return calls to add and remove friend
This commit is contained in:
parent
b731228fb8
commit
0d6786ffe9
1 changed files with 2 additions and 2 deletions
|
@ -38,11 +38,11 @@ export const useApi = () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
async function addFriend(username: string): Promise<void> {
|
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> {
|
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> {
|
async function fetchMessages(channelId: string, options?: { amount?: number, offset?: number }): Promise<MessageResponse[] | undefined> {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue