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

@ -11,7 +11,7 @@ export default defineEventHandler(async (h3) => {
if (!unsafeId)
throw createError({
statusCode: 400,
statusMessage: "Missing screenshot ID",
message: "Missing screenshot ID",
});
const screenshotId = sanitize(unsafeId);

View File

@ -11,7 +11,7 @@ export default defineEventHandler(async (h3) => {
if (!unsafeId)
throw createError({
statusCode: 400,
statusMessage: "Missing screenshot ID",
message: "Missing screenshot ID",
});
const result = await screenshotManager.get(sanitize(unsafeId));

View File

@ -10,7 +10,7 @@ export default defineEventHandler(async (h3) => {
if (!gameId)
throw createError({
statusCode: 400,
statusMessage: "Missing game ID",
message: "Missing game ID",
});
const results = await screenshotManager.getUserAllByGame(userId, gameId);

View File

@ -13,7 +13,7 @@ export default defineEventHandler(async (h3) => {
if (!gameId)
throw createError({
statusCode: 400,
statusMessage: "Missing game ID",
message: "Missing game ID",
});
const game = await prisma.game.findUnique({
@ -21,7 +21,7 @@ export default defineEventHandler(async (h3) => {
select: { id: true },
});
if (!game)
throw createError({ statusCode: 400, statusMessage: "Invalid game ID" });
throw createError({ statusCode: 400, message: "Invalid game ID" });
await screenshotManager.upload(userId, gameId, h3.node.req);
});