mirror of
https://github.com/Drop-OSS/drop.git
synced 2025-11-21 04:01:10 +10:00
partial: user routes
This commit is contained in:
@ -1,8 +1,11 @@
|
||||
// get a specific screenshot
|
||||
import aclManager from "~/server/internal/acls";
|
||||
import screenshotManager from "~/server/internal/screenshots";
|
||||
import sanitize from "sanitize-filename";
|
||||
|
||||
/**
|
||||
* Delete screenshot by ID
|
||||
* @param id Screenshot ID
|
||||
*/
|
||||
export default defineEventHandler(async (h3) => {
|
||||
const userId = await aclManager.getUserIdACL(h3, ["screenshots:delete"]);
|
||||
if (!userId) throw createError({ statusCode: 403 });
|
||||
|
||||
Reference in New Issue
Block a user