feat: very basic screenshot api

This commit is contained in:
Huskydog9988
2025-05-15 15:51:35 -04:00
parent 831b20d737
commit a89c657fe1
9 changed files with 126 additions and 5 deletions

View File

@ -0,0 +1,11 @@
// get all user screenshots
import aclManager from "~/server/internal/acls";
import screenshotManager from "~/server/internal/screenshots";
export default defineEventHandler(async (h3) => {
const userId = await aclManager.getUserIdACL(h3, ["screenshots:read"]);
if (!userId) throw createError({ statusCode: 403 });
const results = await screenshotManager.getUserAll(userId);
return results;
});