Use nullish coalescing in admin users create

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
RevIQ
2026-01-09 17:14:21 +08:00
parent d04f061120
commit ed2636ab83

View File

@@ -44,7 +44,7 @@ export const adminUsersCreate = os.admin.users.create
.insertInto("users")
.values({
email: normalizedEmail,
display_name: name || null,
display_name: name ?? null,
})
.returning(["id"])
.executeTakeFirstOrThrow();
@@ -55,7 +55,7 @@ export const adminUsersCreate = os.admin.users.create
.values({
org_id: orgId,
user_id: newUser.id,
role: orgRole || "member",
role: orgRole ?? "member",
})
.execute();
}