Fixed creator bug when adding new user

This commit is contained in:
Mitchell Magro 2025-10-27 13:24:24 +01:00
parent eff7f62299
commit 7c716f5b27

View File

@ -69,7 +69,7 @@ export async function POST(request: Request) {
// Map frontend payload to backend RegisterRequest format
const registerPayload: RegisterRequest = {
creator: body.creator || randomUUID(), // Generate UUID if not provided
creator: body.creator || "",
email: body.email,
first_name: body.firstName,
groups: body.groups || ["Reader"], // Default to empty array if not provided