create user with passwordHash

This commit is contained in:
Oliver Bryan
2025-12-22 03:20:52 +00:00
parent 8462209bab
commit fe15ad43f5

View File

@@ -1,9 +1,9 @@
import { User } from "@issue/shared";
import { eq } from "drizzle-orm";
import { db } from "../client";
import { User } from "@issue/shared";
export async function createUser(name: string, username: string) {
const [user] = await db.insert(User).values({ name, username }).returning();
export async function createUser(name: string, username: string, passwordHash: string) {
const [user] = await db.insert(User).values({ name, username, passwordHash }).returning();
return user;
}