mirror of
https://github.com/Drop-OSS/drop.git
synced 2025-11-21 20:21:10 +10:00
partial: add admin game annotations
This commit is contained in:
@ -2,6 +2,10 @@ import aclManager from "~/server/internal/acls";
|
||||
import prisma from "~/server/internal/db/database";
|
||||
import { handleFileUpload } from "~/server/internal/utils/handlefileupload";
|
||||
|
||||
/**
|
||||
* Upload a game to a game's image library
|
||||
* @request `multipart/form-data`. All files will be uploaded as images. Set the game ID in the `id` field.
|
||||
*/
|
||||
export default defineEventHandler(async (h3) => {
|
||||
const allowed = await aclManager.allowSystemACL(h3, ["game:image:new"]);
|
||||
if (!allowed) throw createError({ statusCode: 403 });
|
||||
|
||||
Reference in New Issue
Block a user