Delete game
All checks were successful
Game Ideas build for PR / build_test (pull_request) Successful in 43s

This commit is contained in:
Maxime Adler
2025-05-12 13:08:23 +02:00
parent bb42aa6dc1
commit 14dc1928bc
11 changed files with 144 additions and 73 deletions

View File

@@ -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);
}
}
}