avatarURL should be nullable AND optional

This commit is contained in:
Oliver Bryan
2026-01-17 22:19:25 +00:00
parent e2560b089b
commit f7c65ce4c8
2 changed files with 7 additions and 2 deletions

View File

@@ -2,7 +2,12 @@ import { type IconStyle, User, type UserRecord } from "@sprint/shared";
import { eq } from "drizzle-orm";
import { db } from "../client";
export async function createUser(name: string, username: string, passwordHash: string, avatarURL?: string) {
export async function createUser(
name: string,
username: string,
passwordHash: string,
avatarURL?: string | null,
) {
const [user] = await db.insert(User).values({ name, username, passwordHash, avatarURL }).returning();
return user;
}