/api/auth/login Endpoint 구현

This commit is contained in:
static
2024-12-26 16:50:13 +09:00
parent d83dc6b8d2
commit fac8764572
10 changed files with 205 additions and 9 deletions

View File

@@ -0,0 +1,8 @@
import { eq } from "drizzle-orm";
import db from "./drizzle";
import { user } from "./schema";
export const getUserByEmail = async (email: string) => {
const users = await db.select().from(user).where(eq(user.email, email)).execute();
return users[0] ?? null;
};