From 68c62495d22ce42b3c15dd109f65aeb294448124 Mon Sep 17 00:00:00 2001 From: Alper Alkan Date: Mon, 22 Apr 2024 09:27:27 +0200 Subject: [PATCH] refactor rawg recache --- src/modules/providers/rawg/rawg.controller.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/modules/providers/rawg/rawg.controller.ts b/src/modules/providers/rawg/rawg.controller.ts index 3e9f035..bf48a2e 100644 --- a/src/modules/providers/rawg/rawg.controller.ts +++ b/src/modules/providers/rawg/rawg.controller.ts @@ -87,10 +87,10 @@ export class RawgController { @ApiOkResponse({ type: () => Game, isArray: true }) @MinimumRole(Role.ADMIN) async putRawgRecacheAll(): Promise { - let games = await this.gamesService.getAll(); - for (const game of games) { + let games = (await this.gamesService.getAll()).map((game) => { game.cache_date = null; - } + return game; + }); games = await this.rawgService.checkCache(games); games = await this.boxartService.checkMultiple(games); return `Successfully recached ${games.length} games`;