Delete game
All checks were successful
Game Ideas build for PR / build_test (pull_request) Successful in 43s
All checks were successful
Game Ideas build for PR / build_test (pull_request) Successful in 43s
This commit is contained in:
@@ -76,4 +76,16 @@ public class GameGateway(IHttpClientService httpClientService) : IGameGateway
|
||||
throw new CategoryNotFoundException(ResourcesKey.ErrorFetchGames);
|
||||
}
|
||||
}
|
||||
|
||||
public async Task<bool> DeleteGame(int gameIdToDelete)
|
||||
{
|
||||
try
|
||||
{
|
||||
return await httpClientService.DeleteAsync<bool>(Endpoints.Game.Delete(gameIdToDelete));
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
throw new GameDeletionException(ResourcesKey.ErrorDeleteGame);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user