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
@@ -5,7 +5,7 @@ import { Album } from "../../models/album"
import mongoose from "mongoose"
export default defineAuthenticatedEventHandler(async (event) => {
await requireAuthenticatedUser(event, true)
await requireAuthenticatedUser(event, true, { allowBearer: true, skipOriginCheck: true })
const parts = await readAdminForm(event)
const name = adminFormText(parts, "name")
const artistInput = adminFormTexts(parts, "artists")