-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: team deletion not deleting users and events
- Loading branch information
1 parent
8512f9f
commit 6890763
Showing
2 changed files
with
50 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
--- | ||
import Base from "../Layouts/Base.astro"; | ||
import { getSession } from "auth-astro/server"; | ||
import { type Session } from "@auth/core/types"; | ||
type ExtendedSession = { | ||
team: string; | ||
teamName: string; | ||
teamImage: string; | ||
user: { | ||
role: string; | ||
}; | ||
}; | ||
const session = (await getSession(Astro.request)) as Session & ExtendedSession; | ||
if (!session) { | ||
return new Response(null, { | ||
status: 302, | ||
headers: new Headers({ | ||
Location: "/", | ||
}), | ||
}); | ||
} | ||
--- | ||
|
||
<Base title="Sign Out"> | ||
<div class="flex items-center justify-center h-screen"> | ||
<div class="text-center"> | ||
<h1 class="text-3xl font-bold">Signing out...</h1> | ||
</div> | ||
</div> | ||
</Base> | ||
|
||
<script> | ||
import { signOut } from "auth-astro/client"; | ||
await signOut(); | ||
</script> |