public async Task <EntryMetadata> SetEntryDataExpiryTime(int competitionId, EntryMetadata metadata) { var competitionEntity = await _gameService.GetGameAsync(competitionId); var competitionMetadata = competitionEntity.Metadata; var newExpiry = DateTime.UtcNow.AddSeconds(competitionMetadata.EntryExpiryInSeconds.Value); metadata.SetExpiryTime(((DateTimeOffset)newExpiry).ToUnixTimeSeconds()); return(metadata); }
public async Task <IActionResult> GetCompetitionAsync([FromRoute] int competitionId) { var competitionDto = await _gameService.GetGameAsync(competitionId); return(Ok(competitionDto)); }