feat: partial user platform support + statusMessage -> message

This commit is contained in:
DecDuck
2025-08-27 11:25:23 +10:00
parent 3af00e085e
commit 8efddc07bc
143 changed files with 831 additions and 593 deletions

View File

@ -28,7 +28,7 @@ export default defineEventHandler(async (h3) => {
const query = getQuery(h3);
const options = StoreRead(query);
if (options instanceof ArkErrors)
throw createError({ statusCode: 400, statusMessage: options.summary });
throw createError({ statusCode: 400, message: options.summary });
/**
* Generic filters

View File

@ -0,0 +1,16 @@
import aclManager from "~/server/internal/acls";
import prisma from "~/server/internal/db/database";
export default defineEventHandler(async (h3) => {
const userId = await aclManager.getUserIdACL(h3, ["store:read"]);
if (!userId) throw createError({ statusCode: 403 });
const platforms = await prisma.userPlatform.findMany({
orderBy: { platformName: "asc" },
select: {
id: true,
platformName: true,
},
});
return platforms;
});