getCookie 제거
This commit is contained in:
@@ -1,12 +1,19 @@
|
||||
import { queryOne, query } from '../../../utils/db'
|
||||
import { requireAuth, getSessionIdFromCookie, getDbSession } from '../../../utils/session'
|
||||
|
||||
/**
|
||||
* 직원 상세 조회
|
||||
* GET /api/employee/[id]/detail
|
||||
*/
|
||||
export default defineEventHandler(async (event) => {
|
||||
await requireAuth(event)
|
||||
|
||||
const employeeId = getRouterParam(event, 'id')
|
||||
const currentHistoryId = getCookie(event, 'login_history_id')
|
||||
|
||||
// 세션에서 현재 로그인 히스토리 ID 가져오기
|
||||
const sessionId = getSessionIdFromCookie(event)
|
||||
const session = sessionId ? await getDbSession(sessionId) : null
|
||||
const currentHistoryId = session?.loginHistoryId || null
|
||||
|
||||
const employee = await queryOne<any>(`
|
||||
SELECT * FROM wr_employee_info WHERE employee_id = $1
|
||||
|
||||
Reference in New Issue
Block a user