mirror of
https://github.com/Drop-OSS/drop.git
synced 2025-11-22 04:31:15 +10:00
partial: annotate rest of admin routes
This commit is contained in:
@ -2,6 +2,10 @@ import { defineEventHandler, createError } from "h3";
|
||||
import aclManager from "~/server/internal/acls";
|
||||
import newsManager from "~/server/internal/news";
|
||||
|
||||
/**
|
||||
* Delete a news article
|
||||
* @param id Article ID
|
||||
*/
|
||||
export default defineEventHandler(async (h3) => {
|
||||
const allowed = await aclManager.allowSystemACL(h3, ["news:delete"]);
|
||||
if (!allowed)
|
||||
|
||||
@ -2,6 +2,10 @@ import { defineEventHandler, createError } from "h3";
|
||||
import aclManager from "~/server/internal/acls";
|
||||
import newsManager from "~/server/internal/news";
|
||||
|
||||
/**
|
||||
* Fetch a single news article
|
||||
* @param id Article ID
|
||||
*/
|
||||
export default defineEventHandler(async (h3) => {
|
||||
const allowed = await aclManager.allowSystemACL(h3, ["news:read"]);
|
||||
if (!allowed)
|
||||
|
||||
Reference in New Issue
Block a user