Allow bearer auth for admin API

This commit is contained in:
lucast committed 2026-10-05 02:01:40 +02:00
1 parent 142e34babe
commit fb99058492
14 files changed
+47 -28

No files matched your search

+1 -1
View File
@@ -11,7 +11,7 @@ async function findDependents(model: typeof Track | typeof Album, field: string,
}
export default defineAuthenticatedEventHandler(async (event) => {
await requireAuthenticatedUser(event, true)
await requireAuthenticatedUser(event, true, { allowBearer: true, skipOriginCheck: true })
const query = getQuery(event)
const parsedId = parseMongoId(query.id)
if ("error" in parsedId) return validationResponse(event, parsedId.error)