Revert "fix: add API key to remaining endpoints"
This reverts commit a26f1fe9f1.
This commit is contained in:
@@ -426,7 +426,7 @@ case 'search_keyword': {
|
|||||||
const tid = a.trace_id ?? a.traceId
|
const tid = a.trace_id ?? a.traceId
|
||||||
if (fu) params.set('file_uuid', fu)
|
if (fu) params.set('file_uuid', fu)
|
||||||
if (tid != null) params.set('trace_id', String(tid))
|
if (tid != null) params.set('trace_id', String(tid))
|
||||||
return { url: `/api/v1/trace-profile?${params.toString()}`, method: 'GET', requiresApiKey: true }
|
return { url: `/api/v1/trace-profile?${params.toString()}`, method: 'GET' }
|
||||||
}
|
}
|
||||||
case 'get_trace_profile_file': {
|
case 'get_trace_profile_file': {
|
||||||
const params = new URLSearchParams()
|
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 }
|
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': {
|
case 'get_file_profile': {
|
||||||
return { url: `/api/v1/file-profile?file_uuid=${a.fileUuid}`, method: 'GET', requiresApiKey: true }
|
return { url: `/api/v1/file-profile?file_uuid=${a.fileUuid}`, method: 'GET' }
|
||||||
}
|
}
|
||||||
case 'update_file_profile': {
|
case 'update_file_profile': {
|
||||||
const body: any = { file_uuid: a.fileUuid, file_path: a.filePath, file_name: a.fileName }
|
const body: any = { file_uuid: a.fileUuid, file_path: a.filePath, file_name: a.fileName }
|
||||||
|
|||||||
@@ -1920,10 +1920,7 @@ let adminFaceFilter: any = null
|
|||||||
async function loadDefaultFaceFilter() {
|
async function loadDefaultFaceFilter() {
|
||||||
try {
|
try {
|
||||||
const base = getApiBase()
|
const base = getApiBase()
|
||||||
const apiKey = localStorage.getItem('momentry_api_key') || 'muser_68600856036340bcafc01930eb4bd839_1774418104_97221b69'
|
const res = await fetch(`${base}/api/v1/admin/config`)
|
||||||
const res = await fetch(`${base}/api/v1/admin/config`, {
|
|
||||||
headers: { 'x-api-key': apiKey }
|
|
||||||
})
|
|
||||||
if (!res.ok) throw new Error(`HTTP ${res.status}`)
|
if (!res.ok) throw new Error(`HTTP ${res.status}`)
|
||||||
const config: any = await res.json()
|
const config: any = await res.json()
|
||||||
adminFaceFilter = config?.filter_config?.face || null
|
adminFaceFilter = config?.filter_config?.face || null
|
||||||
|
|||||||
Reference in New Issue
Block a user