mirror of
https://github.com/Drop-OSS/drop.git
synced 2025-11-09 20:12:10 +10:00
Fix for undeleted games from library sources (#148)
* fix: casade delete for games and library sources * fix: add bug workaround * fix: lint
This commit is contained in:
@ -61,6 +61,14 @@ export default defineNitroPlugin(async () => {
|
||||
});
|
||||
}
|
||||
|
||||
// Delete all games that don't have a library provider after the legacy handler
|
||||
// (leftover from a bug)
|
||||
await prisma.game.deleteMany({
|
||||
where: {
|
||||
libraryId: null,
|
||||
},
|
||||
});
|
||||
|
||||
for (const library of libraries) {
|
||||
const constructor = libraryConstructors[library.backend];
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user