From 00d6eb0a00d6fa57868e38128bc190ef64611b93 Mon Sep 17 00:00:00 2001 From: SauceyRed Date: Sat, 31 May 2025 17:11:08 +0200 Subject: [PATCH] fix: missing return type in some fetch functions --- composables/api.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/composables/api.ts b/composables/api.ts index f1ac525..c74f8f3 100644 --- a/composables/api.ts +++ b/composables/api.ts @@ -1,7 +1,7 @@ -import type { ChannelResponse, GuildResponse, MessageResponse } from "~/types/interfaces"; +import type { ChannelResponse, GuildMemberResponse, GuildResponse, MessageResponse } from "~/types/interfaces"; export const useApi = () => { - async function fetchGuilds(guildId: string): Promise { + async function fetchGuilds(): Promise { return await fetchWithApi(`/guilds`); } @@ -18,15 +18,15 @@ export const useApi = () => { } - async function fetchMembers(guildId: string) { + async function fetchMembers(guildId: string): Promise { return await fetchWithApi(`/guilds/${guildId}/members`); } - async function fetchMember(guildId: string, memberId: string) { + async function fetchMember(guildId: string, memberId: string): Promise { return await fetchWithApi(`/guilds/${guildId}/members/${memberId}`); } - async function fetchUsers(userId: string) { + async function fetchUsers() { return await fetchWithApi(`/users`); }