From 434ae5843e8e3cfa6de89435a6ab441a79e9f2cf Mon Sep 17 00:00:00 2001 From: Wroclaw Date: Thu, 9 Nov 2023 17:29:41 +0100 Subject: [PATCH] api/firstRun.post: await for user creation --- server/api/firstRun.post.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/api/firstRun.post.ts b/server/api/firstRun.post.ts index 714be3b..70aa5a8 100644 --- a/server/api/firstRun.post.ts +++ b/server/api/firstRun.post.ts @@ -24,7 +24,7 @@ export default defineEventHandler(async (e) => { if (typeof email !== "string") throw createError({ message: "email is not string", statusCode: 400 }); execSync("npx prisma db push --force-reset"); - database.user.create({ + await database.user.create({ data: { id: new Snowflake().state, username,