fix: missing return type in some fetch functions
This commit is contained in:
parent
abf3b248c4
commit
00d6eb0a00
1 changed files with 5 additions and 5 deletions
|
@ -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<GuildResponse[] | undefined> {
|
||||
async function fetchGuilds(): Promise<GuildResponse[] | undefined> {
|
||||
return await fetchWithApi(`/guilds`);
|
||||
}
|
||||
|
||||
|
@ -18,15 +18,15 @@ export const useApi = () => {
|
|||
}
|
||||
|
||||
|
||||
async function fetchMembers(guildId: string) {
|
||||
async function fetchMembers(guildId: string): Promise<GuildMemberResponse[] | undefined> {
|
||||
return await fetchWithApi(`/guilds/${guildId}/members`);
|
||||
}
|
||||
|
||||
async function fetchMember(guildId: string, memberId: string) {
|
||||
async function fetchMember(guildId: string, memberId: string): Promise<GuildMemberResponse | undefined> {
|
||||
return await fetchWithApi(`/guilds/${guildId}/members/${memberId}`);
|
||||
}
|
||||
|
||||
async function fetchUsers(userId: string) {
|
||||
async function fetchUsers() {
|
||||
return await fetchWithApi(`/users`);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue