feat: add fetchInvite function

This commit is contained in:
SauceyRed 2025-07-20 02:33:57 +02:00
parent 08436fdce0
commit c87fffe6c9
Signed by: sauceyred
GPG key ID: 2BF92EB6D8A5CCA7

View file

@ -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
}
}