mirror of
https://github.com/Since-3/Kuma.git
synced 2026-10-12 21:41:17 +00:00
added reverse checkin
This commit is contained in:
parent
4971988160
commit
56b87cb0b6
1 changed files with 11 additions and 0 deletions
|
|
@ -28,6 +28,17 @@ export async function POST(request: Request) {
|
|||
return NextResponse.json({ error: "Pflichtfelder fehlen" }, { status: 400 });
|
||||
}
|
||||
|
||||
const existingUser = await prisma.user.findUnique({
|
||||
where: { email },
|
||||
});
|
||||
|
||||
if (existingUser) {
|
||||
return NextResponse.json(
|
||||
{ error: "Ein User kann nicht gleichzeitig ein Manager sein" },
|
||||
{ status: 409 }
|
||||
);
|
||||
}
|
||||
|
||||
const supabase = await createClient();
|
||||
|
||||
// Create Manager in Supabase Auth
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue