Skip to content

Commit

Permalink
Merge pull request #86 from cmu-sei/next
Browse files Browse the repository at this point in the history
3.6.18
  • Loading branch information
sei-jbooz authored Dec 7, 2022
2 parents 6ecd3b3 + 807c3b5 commit 9de599d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public async Task<CubespaceScoreboardState> GetScoreboard(CubespaceScoreboardReq
{
Id = p.TeamId,
// ignore name for now - we'll resolve it later
Day1Score = Math.Floor(p.Challenges.Sum(c => c.Score)),
Day1Score = p.Score,
Day1Playtime = p.Time
})
.DistinctBy(team => team.Id)
Expand Down
8 changes: 4 additions & 4 deletions src/Gameboard.Api/Features/UnityGames/UnityGameController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public async Task<string> UndeployUnitySpace([FromQuery] string gid, [FromRoute]
/// <returns>ChallengeEvent</returns>
[Authorize]
[HttpPost("api/unity/challenge")]
public async Task<Data.Challenge> CreateChallenge([FromBody] NewUnityChallenge model)
public async Task<IActionResult> CreateChallenge([FromBody] NewUnityChallenge model)
{
AuthorizeAny(
() => _gameService.UserIsTeamPlayer(Actor.Id, model.GameId, model.TeamId).Result
Expand All @@ -144,7 +144,7 @@ public async Task<string> UndeployUnitySpace([FromQuery] string gid, [FromRoute]
challengeData = await _unityGameService.HasChallengeData(model);
if (challengeData != null)
{
return challengeData;
return Accepted();
}

// otherwise, add new challenge data and send gamebrain the ids of the consoles (which are based on the challenge id)
Expand Down Expand Up @@ -190,8 +190,8 @@ public async Task<string> UndeployUnitySpace([FromQuery] string gid, [FromRoute]
await _hub.Clients
.Group(model.TeamId)
.ChallengeEvent(new HubEvent<Challenge>(_mapper.Map<Challenge>(challengeData), EventAction.Updated));

return challengeData;
return Ok();
}

[HttpPost("api/unity/mission-update")]
Expand Down

0 comments on commit 9de599d

Please sign in to comment.