Allow bearer auth for admin API
This commit is contained in:
1 parent
142e34babe
commit
fb99058492
14 files changed
+47
-28
No files matched your search
@@ -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")
|
||||
|
||||
Reference in new issue
Block a user