mirror of
https://github.com/Drop-OSS/drop.git
synced 2025-11-21 12:11:09 +10:00
partial: annotate rest of admin routes
This commit is contained in:
@ -1,6 +1,9 @@
|
||||
import aclManager from "~/server/internal/acls";
|
||||
import prisma from "~/server/internal/db/database";
|
||||
|
||||
/**
|
||||
* Fetch dummy data for rendering the settings page.
|
||||
*/
|
||||
export default defineEventHandler(async (h3) => {
|
||||
const allowed = await aclManager.getUserACL(h3, ["settings:read"]);
|
||||
if (!allowed) throw createError({ statusCode: 403 });
|
||||
|
||||
@ -8,6 +8,9 @@ const UpdateSettings = type({
|
||||
showGamePanelTextDecoration: "boolean",
|
||||
});
|
||||
|
||||
/**
|
||||
* Update global Drop settings.
|
||||
*/
|
||||
export default defineEventHandler<{ body: typeof UpdateSettings.infer }>(
|
||||
async (h3) => {
|
||||
const allowed = await aclManager.allowSystemACL(h3, ["settings:update"]);
|
||||
|
||||
Reference in New Issue
Block a user