public IActionResult getAllContests() { try { List <ContestInfoDTO> response = contestService.getAll(); if (response.Count == 0 || response == null) { throw new AppException("Brak konkursów w bazie"); } return(Ok(response)); } catch (Exception e) { return(BadRequest(new { message = e.Message })); } }