getCookie 제거
This commit is contained in:
@@ -1,15 +1,13 @@
|
||||
import { query } from '../../utils/db'
|
||||
import { callOpenAIVision } from '../../utils/openai'
|
||||
import { requireAuth } from '../../utils/session'
|
||||
|
||||
/**
|
||||
* 개인 주간보고 이미지 분석 (OpenAI Vision)
|
||||
* POST /api/ai/parse-my-report-image
|
||||
*/
|
||||
export default defineEventHandler(async (event) => {
|
||||
const userId = getCookie(event, 'user_id')
|
||||
if (!userId) {
|
||||
throw createError({ statusCode: 401, message: '로그인이 필요합니다.' })
|
||||
}
|
||||
const userId = await requireAuth(event)
|
||||
|
||||
const body = await readBody<{ images: string[] }>(event)
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { query } from '../../utils/db'
|
||||
import { callOpenAI } from '../../utils/openai'
|
||||
import { requireAuth } from '../../utils/session'
|
||||
|
||||
interface ParsedTask {
|
||||
description: string
|
||||
@@ -26,10 +27,7 @@ interface ParsedResult {
|
||||
* POST /api/ai/parse-my-report
|
||||
*/
|
||||
export default defineEventHandler(async (event) => {
|
||||
const userId = getCookie(event, 'user_id')
|
||||
if (!userId) {
|
||||
throw createError({ statusCode: 401, message: '로그인이 필요합니다.' })
|
||||
}
|
||||
const userId = await requireAuth(event)
|
||||
|
||||
const body = await readBody<{ rawText: string }>(event)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user