Merge remote-tracking branch 'origin/main' into profile-modal
All checks were successful
ci/woodpecker/push/build-and-publish Pipeline was successful
ci/woodpecker/pr/build-and-publish Pipeline was successful

This commit is contained in:
Twig 2025-08-04 03:34:34 +02:00
commit 7e387e1d52
Signed by: twig
SSH key fingerprint: SHA256:nBO+OwpTkd8LYhe38PIqdxmDvkIg9Vw2EbrRZM97dkU
6 changed files with 194 additions and 4 deletions

View file

@ -98,6 +98,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,
@ -120,6 +124,7 @@ export const useApi = () => {
fetchInstanceStats,
sendVerificationEmail,
sendPasswordResetEmail,
resetPassword
resetPassword,
fetchInvite
}
}

View file

@ -41,7 +41,7 @@ export const useAuth = () => {
async function logout() {
console.log("access:", accessToken.value);
await fetchWithApi("/auth/logout", { method: "GET", credentials: "include" });
await fetchWithApi("/auth/logout", { method: "DELETE", credentials: "include" });
clearAuth();
return await navigateTo("/login");