diff --git a/src/api/index.ts b/src/api/index.ts index ba108b2..c188d2c 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -426,7 +426,7 @@ case 'search_keyword': { const tid = a.trace_id ?? a.traceId if (fu) params.set('file_uuid', fu) if (tid != null) params.set('trace_id', String(tid)) - return { url: `/api/v1/trace-profile?${params.toString()}`, method: 'GET' } + return { url: `/api/v1/trace-profile?${params.toString()}`, method: 'GET', requiresApiKey: true } } case 'get_trace_profile_file': { const params = new URLSearchParams() @@ -583,7 +583,7 @@ case 'search_keyword': { return { url: '/api/v1/trace-profile/group', method: 'PUT', body: { file_uuid: a.fileUuid, trace_ids: a.traceIds, name: a.name, key_frame: a.keyFrame, key_face: a.keyFace }, requiresApiKey: true } } case 'get_file_profile': { - return { url: `/api/v1/file-profile?file_uuid=${a.fileUuid}`, method: 'GET' } + return { url: `/api/v1/file-profile?file_uuid=${a.fileUuid}`, method: 'GET', requiresApiKey: true } } case 'update_file_profile': { const body: any = { file_uuid: a.fileUuid, file_path: a.filePath, file_name: a.fileName } diff --git a/src/views/PeopleView.vue b/src/views/PeopleView.vue index e3640b8..af4f632 100644 --- a/src/views/PeopleView.vue +++ b/src/views/PeopleView.vue @@ -1920,7 +1920,10 @@ let adminFaceFilter: any = null async function loadDefaultFaceFilter() { try { const base = getApiBase() - const res = await fetch(`${base}/api/v1/admin/config`) + const apiKey = localStorage.getItem('momentry_api_key') || 'muser_68600856036340bcafc01930eb4bd839_1774418104_97221b69' + const res = await fetch(`${base}/api/v1/admin/config`, { + headers: { 'x-api-key': apiKey } + }) if (!res.ok) throw new Error(`HTTP ${res.status}`) const config: any = await res.json() adminFaceFilter = config?.filter_config?.face || null