데모용 임시 회원가입 구현

This commit is contained in:
static
2025-05-28 18:00:17 +09:00
parent 36006a9b72
commit 451dd3c129
8 changed files with 134 additions and 5 deletions

View File

@@ -7,6 +7,15 @@ interface User {
password: string;
}
export const createUser = async (email: string, nickname: string, password: string) => {
const { id } = await db
.insertInto("user")
.values({ email, nickname, password })
.returning("id")
.executeTakeFirstOrThrow();
return { id, email, nickname, password } satisfies User;
};
export const getUser = async (userId: number) => {
const user = await db
.selectFrom("user")