mirror of
https://github.com/Drop-OSS/drop.git
synced 2025-11-14 16:51: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",
|
id: "string",
|
||||||
}).configure(throwingArktype);
|
}).configure(throwingArktype);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Delete a simple auth invitation
|
||||||
|
*/
|
||||||
export default defineEventHandler<{
|
export default defineEventHandler<{
|
||||||
body: typeof DeleteInvite.infer;
|
body: typeof DeleteInvite.infer;
|
||||||
}>(async (h3) => {
|
}>(async (h3) => {
|
||||||
|
|||||||
@ -8,7 +8,7 @@ const DeleteVersion = type({
|
|||||||
versionName: "string",
|
versionName: "string",
|
||||||
}).configure(throwingArktype);
|
}).configure(throwingArktype);
|
||||||
|
|
||||||
export default defineEventHandler<{ body: typeof DeleteVersion }>(
|
export default defineEventHandler<{ body: typeof DeleteVersion.infer }>(
|
||||||
async (h3) => {
|
async (h3) => {
|
||||||
const allowed = await aclManager.allowSystemACL(h3, [
|
const allowed = await aclManager.allowSystemACL(h3, [
|
||||||
"game:version:delete",
|
"game:version:delete",
|
||||||
|
|||||||
@ -8,7 +8,7 @@ const UpdateVersionOrder = type({
|
|||||||
versions: "string[]",
|
versions: "string[]",
|
||||||
}).configure(throwingArktype);
|
}).configure(throwingArktype);
|
||||||
|
|
||||||
export default defineEventHandler<{ body: typeof UpdateVersionOrder }>(
|
export default defineEventHandler<{ body: typeof UpdateVersionOrder.infer }>(
|
||||||
async (h3) => {
|
async (h3) => {
|
||||||
const allowed = await aclManager.allowSystemACL(h3, [
|
const allowed = await aclManager.allowSystemACL(h3, [
|
||||||
"game:version:update",
|
"game:version:update",
|
||||||
|
|||||||
@ -1,6 +1,11 @@
|
|||||||
import aclManager from "~/server/internal/acls";
|
import aclManager from "~/server/internal/acls";
|
||||||
import prisma from "~/server/internal/db/database";
|
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) => {
|
export default defineEventHandler(async (h3) => {
|
||||||
const allowed = await aclManager.allowSystemACL(h3, ["tags:delete"]);
|
const allowed = await aclManager.allowSystemACL(h3, ["tags:delete"]);
|
||||||
if (!allowed) throw createError({ statusCode: 403 });
|
if (!allowed) throw createError({ statusCode: 403 });
|
||||||
|
|||||||
Reference in New Issue
Block a user