mirror of
https://github.com/Drop-OSS/drop.git
synced 2025-11-14 16:51:15 +10:00
feat: partial user platform support + statusMessage -> message
This commit is contained in:
@ -32,11 +32,11 @@ export default defineEventHandler<{
|
||||
});
|
||||
|
||||
if (!game)
|
||||
throw createError({ statusCode: 400, statusMessage: "Invalid game ID" });
|
||||
throw createError({ statusCode: 400, message: "Invalid game ID" });
|
||||
|
||||
const imageIndex = game.mImageLibraryObjectIds.findIndex((e) => e == imageId);
|
||||
if (imageIndex == -1)
|
||||
throw createError({ statusCode: 400, statusMessage: "Image not found" });
|
||||
throw createError({ statusCode: 400, message: "Image not found" });
|
||||
|
||||
game.mImageLibraryObjectIds.splice(imageIndex, 1);
|
||||
await objectHandler.deleteAsSystem(imageId);
|
||||
|
||||
Reference in New Issue
Block a user