Skip to content

Commit

Permalink
Fix auth stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
sei-bstein committed Sep 13, 2024
1 parent a2eebfe commit db28b84
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,9 @@

namespace Gameboard.Api.Tests.Integration;

public class GameControllerTests : IClassFixture<GameboardTestContext>
public class GameControllerTests(GameboardTestContext testContext) : IClassFixture<GameboardTestContext>
{
private readonly GameboardTestContext _testContext;

public GameControllerTests(GameboardTestContext testContext)
{
_testContext = testContext;
}
private readonly GameboardTestContext _testContext = testContext;

[Fact]
public async Task GameController_Create_ReturnsGame()
Expand Down
2 changes: 1 addition & 1 deletion src/Gameboard.Api/Features/Game/GameController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public Task DeployResources([FromRoute] string gameId, [FromBody] DeployGameReso
[HttpPut("api/game")]
public async Task<Data.Game> Update([FromBody] ChangedGame model)
{
await _permissionsService.Can(PermissionKey.Games_CreateEditDelete);
await Authorize(_permissionsService.Can(PermissionKey.Games_CreateEditDelete));
await Validate(model);
return await GameService.Update(model);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,5 @@ private async Task<IEnumerable<DenormalizedTeamScore>> LoadDenormalizedTeams(str
.Where(s => s.GameId == gameId)
.OrderBy(s => s.Rank)
.Where(s => s.ScoreOverall > 0)
.Where(s => s.Rank != 0)
.ToArrayAsync(cancellationToken);
}

0 comments on commit db28b84

Please sign in to comment.