feat: add fetchInvite function
This commit is contained in:
parent
08436fdce0
commit
c87fffe6c9
1 changed files with 6 additions and 1 deletions
|
@ -94,6 +94,10 @@ export const useApi = () => {
|
|||
await fetchWithApi("/auth/reset-password", { method: "POST", body: { password, token } });
|
||||
}
|
||||
|
||||
async function fetchInvite(id: string): Promise<GuildResponse | undefined> {
|
||||
return await fetchWithApi(`/invites/${id}`);
|
||||
}
|
||||
|
||||
return {
|
||||
fetchGuilds,
|
||||
fetchGuild,
|
||||
|
@ -115,6 +119,7 @@ export const useApi = () => {
|
|||
fetchInstanceStats,
|
||||
sendVerificationEmail,
|
||||
sendPasswordResetEmail,
|
||||
resetPassword
|
||||
resetPassword,
|
||||
fetchInvite
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue