mirror of
https://github.com/hex248/sprint.git
synced 2026-02-08 02:33:01 +00:00
create user with passwordHash
This commit is contained in:
@@ -1,9 +1,9 @@
|
|||||||
|
import { User } from "@issue/shared";
|
||||||
import { eq } from "drizzle-orm";
|
import { eq } from "drizzle-orm";
|
||||||
import { db } from "../client";
|
import { db } from "../client";
|
||||||
import { User } from "@issue/shared";
|
|
||||||
|
|
||||||
export async function createUser(name: string, username: string) {
|
export async function createUser(name: string, username: string, passwordHash: string) {
|
||||||
const [user] = await db.insert(User).values({ name, username }).returning();
|
const [user] = await db.insert(User).values({ name, username, passwordHash }).returning();
|
||||||
return user;
|
return user;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user