mirror of
https://github.com/Drop-OSS/drop.git
synced 2025-11-22 12:41:10 +10:00
fix: add no-prisma-delete lint
This commit is contained in:
@ -38,16 +38,14 @@ export default defineClientEventHandler(
|
||||
if (!game)
|
||||
throw createError({ statusCode: 400, statusMessage: "Invalid game ID" });
|
||||
|
||||
const save = await prisma.saveSlot.delete({
|
||||
const { count } = await prisma.saveSlot.deleteMany({
|
||||
where: {
|
||||
id: {
|
||||
userId: user.id,
|
||||
gameId: gameId,
|
||||
index: slotIndex,
|
||||
},
|
||||
userId: user.id,
|
||||
gameId: gameId,
|
||||
index: slotIndex,
|
||||
},
|
||||
});
|
||||
if (!save)
|
||||
if (count == 0)
|
||||
throw createError({ statusCode: 404, statusMessage: "Save not found" });
|
||||
},
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user