Skip to content

Commit

Permalink
Merge pull request #8 from WiiLink24/fix/switch-3ds
Browse files Browse the repository at this point in the history
fix: welp
  • Loading branch information
matthe815 authored Aug 3, 2024
2 parents e5b9ce8 + c2f4cff commit dd821a5
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions src/lib/riitag/neo/std/Covers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,20 @@ export default class Covers extends ModuleBase {
* @returns
*/
async getAllUserCovers (user: user): Promise<string[]> {
await prisma.playlog.deleteMany({
where: {
game: {
console: CONSOLE.THREEDS
}
}
})

await prisma.playlog.deleteMany({
where: {
game: null
}
})

const playlog = await prisma.playlog.findMany({
where: {
user: {
Expand Down Expand Up @@ -219,20 +233,6 @@ export default class Covers extends ModuleBase {
return []
}

await prisma.playlog.deleteMany({
where: {
game: {
console: CONSOLE.THREEDS
}
}
})

await prisma.playlog.deleteMany({
where: {
game: null
}
})

for (const entry of playlog) {
if (!entry.game || entry.game.console === CONSOLE.THREEDS || entry.game.console === CONSOLE.SWITCH) {
await prisma.playlog.delete({
Expand Down

0 comments on commit dd821a5

Please sign in to comment.