Example #1
0
 public async Task <ActionResult <ContestViewDto> > ViewContest(int id)
 {
     try
     {
         return(Ok(await _service.GetContestViewAsync(id)));
     }
     catch (NotFoundException e)
     {
         return(NotFound(e.Message));
     }
     catch (UnauthorizedAccessException e)
     {
         return(Unauthorized(e.Message));
     }
 }