fix: add API key to remaining endpoints
- Added requiresApiKey: true to get_trace_profile, get_file_profile - Added x-api-key header to loadDefaultFaceFilter fetch call - Fixes 401 errors on admin/config, trace-profile, and file-profile endpoints
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user