mirror of
https://github.com/Drop-OSS/drop.git
synced 2025-11-14 08:41:15 +10:00
feat: add initial type hints for API docs
This commit is contained in:
Submodule drop-base updated: 04125e89be...4c42edf5ad
@ -7,6 +7,9 @@ const DeleteInvite = type({
|
||||
id: "string",
|
||||
}).configure(throwingArktype);
|
||||
|
||||
/**
|
||||
* Delete a simple auth invitation
|
||||
*/
|
||||
export default defineEventHandler<{
|
||||
body: typeof DeleteInvite.infer;
|
||||
}>(async (h3) => {
|
||||
|
||||
@ -8,7 +8,7 @@ const DeleteVersion = type({
|
||||
versionName: "string",
|
||||
}).configure(throwingArktype);
|
||||
|
||||
export default defineEventHandler<{ body: typeof DeleteVersion }>(
|
||||
export default defineEventHandler<{ body: typeof DeleteVersion.infer }>(
|
||||
async (h3) => {
|
||||
const allowed = await aclManager.allowSystemACL(h3, [
|
||||
"game:version:delete",
|
||||
|
||||
@ -8,7 +8,7 @@ const UpdateVersionOrder = type({
|
||||
versions: "string[]",
|
||||
}).configure(throwingArktype);
|
||||
|
||||
export default defineEventHandler<{ body: typeof UpdateVersionOrder }>(
|
||||
export default defineEventHandler<{ body: typeof UpdateVersionOrder.infer }>(
|
||||
async (h3) => {
|
||||
const allowed = await aclManager.allowSystemACL(h3, [
|
||||
"game:version:update",
|
||||
|
||||
@ -1,6 +1,11 @@
|
||||
import aclManager from "~/server/internal/acls";
|
||||
import prisma from "~/server/internal/db/database";
|
||||
|
||||
/**
|
||||
* This route allows you to delete game organization tags.
|
||||
*
|
||||
* @param {string} id test
|
||||
*/
|
||||
export default defineEventHandler(async (h3) => {
|
||||
const allowed = await aclManager.allowSystemACL(h3, ["tags:delete"]);
|
||||
if (!allowed) throw createError({ statusCode: 403 });
|
||||
|
||||
Reference in New Issue
Block a user