fix: fixing multiple calls for backup

This commit is contained in:
Chubby Granny Chaser
2024-10-20 08:09:15 +01:00
parent 0e5d37a3a0
commit b7c9b5ec54
10 changed files with 101 additions and 114 deletions

View File

@@ -66,13 +66,16 @@ export class Ludusavi {
objectId: string,
backupPath: string
): Promise<LudusaviBackup | null> {
console.log("a");
const games = await this.findGames(shop, objectId);
if (!games.length) return null;
console.log("b");
const backupData = await this.worker.run(
{ title: games[0], backupPath, preview: true },
{ name: "backupGame" }
);
console.log("c");
return backupData;
}