mirror of
https://github.com/Drop-OSS/drop.git
synced 2025-11-15 01:01:20 +10:00
feat: partial user platform support + statusMessage -> message
This commit is contained in:
@ -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);
|
||||
|
||||
@ -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));
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user