Skip to content

Commit

Permalink
refactor rawg recache
Browse files Browse the repository at this point in the history
  • Loading branch information
Alfagun74 committed Apr 22, 2024
1 parent fb02126 commit 68c6249
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/modules/providers/rawg/rawg.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,10 @@ export class RawgController {
@ApiOkResponse({ type: () => Game, isArray: true })
@MinimumRole(Role.ADMIN)
async putRawgRecacheAll(): Promise<string> {
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`;
Expand Down

0 comments on commit 68c6249

Please sign in to comment.