mirror of
https://github.com/kmc7468/arkvault.git
synced 2025-12-16 06:58:46 +00:00
DB에 동시적으로 접근하더라도 데이터 무결성이 깨지지 않도록 DB 접근 코드 수정
This commit is contained in:
@@ -3,6 +3,6 @@ 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();
|
||||
const users = await db.select().from(user).where(eq(user.email, email)).limit(1);
|
||||
return users[0] ?? null;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user