fix: create user async is called twice

This commit is contained in:
Meier Lukas
2024-05-18 13:50:25 +02:00
parent f30f133bfa
commit 7fa120c474

View File

@@ -54,7 +54,7 @@ export const userRouter = createTRPCRouter({
await checkUsernameAlreadyTakenAndThrowAsync(ctx.db, input.username);
await createUserAsync(ctx.db, input);
await createUserAsync(ctx.db, input);
// Delete invite as it's used
await ctx.db.delete(invites).where(inviteWhere);
}),
@@ -64,7 +64,7 @@ export const userRouter = createTRPCRouter({
await checkUsernameAlreadyTakenAndThrowAsync(ctx.db, input.username);
await createUserAsync(ctx.db, input);
}),
}),
setProfileImage: protectedProcedure
.input(
z.object({