Skip to content

Commit

Permalink
Remove unnecessary data sent to client.
Browse files Browse the repository at this point in the history
  • Loading branch information
sei-bstein committed Dec 7, 2022
1 parent 7363886 commit 807c3b5
Showing 1 changed file with 4 additions and 4 deletions.
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 807c3b5

Please sign in to comment.