Add detail game page (#41)
All checks were successful
Game Ideas deploy / build-test-deploy (push) Successful in 1m24s

Reviewed-on: #41
This commit was merged in pull request #41.
This commit is contained in:
2025-05-04 15:27:06 +02:00
parent f3c9e1d9da
commit d9d036896d
37 changed files with 1174 additions and 224 deletions

View File

@@ -62,4 +62,18 @@ public class GameGateway(IHttpClientService httpClientService) : IGameGateway
throw new GameNotFoundException(ResourcesKey.ErrorFetchGames);
}
}
public async Task<GameDetailDto> GetGameById(int gameId)
{
try
{
var result = await httpClientService.FetchDataAsync<GameDetailDto>(Endpoints.Game.FetchById(gameId));
return result ?? throw new InvalidOperationException(ResourcesKey.ErrorFetchGames);
}
catch (Exception)
{
throw new CategoryNotFoundException(ResourcesKey.ErrorFetchGames);
}
}
}