Normalize admin API auth responses
This commit is contained in:
1 parent
31e6c0c5d2
commit
a2b8dec813
12 files changed
+25
-25
No files matched your search
@@ -1,8 +1,8 @@
|
||||
import { readBody, setResponseStatus } from "h3"
|
||||
import { Genre } from "../../models/genre"
|
||||
import { requireAuthenticatedUser } from "../../utils/auth"
|
||||
import { defineAuthenticatedEventHandler, requireAuthenticatedUser } from "../../utils/auth"
|
||||
|
||||
export default defineEventHandler(async (event) => {
|
||||
export default defineAuthenticatedEventHandler(async (event) => {
|
||||
await requireAuthenticatedUser(event, true)
|
||||
|
||||
const body = await readBody<unknown>(event)
|
||||
|
||||
Reference in new issue
Block a user