fix: getSession to getDbSession to avoid h3 conflict
This commit is contained in:
@@ -47,7 +47,7 @@ export async function createSession(
|
||||
/**
|
||||
* 세션 조회 (유효한 세션만)
|
||||
*/
|
||||
export async function getSession(sessionId: string): Promise<Session | null> {
|
||||
export async function getDbSession(sessionId: string): Promise<Session | null> {
|
||||
if (!sessionId) return null
|
||||
|
||||
const row = await queryOne<any>(`
|
||||
@@ -168,7 +168,7 @@ export async function getAuthenticatedUserId(event: any): Promise<number | null>
|
||||
// 1. 새로운 세션 토큰 확인
|
||||
const sessionId = getSessionIdFromCookie(event)
|
||||
if (sessionId) {
|
||||
const session = await getSession(sessionId)
|
||||
const session = await getDbSession(sessionId)
|
||||
if (session) {
|
||||
await refreshSession(sessionId)
|
||||
return session.employeeId
|
||||
|
||||
Reference in New Issue
Block a user