public async Task <ActionResult> One(int id) { try { await _service.hasAccess(id, User.Identity.Name); var hire = _service.GetHireById(id); return(Ok(hire)); } catch (HireNotFoundException) { return(NotFound()); } catch (AccessDeniedException) { return(Forbid()); } }
public IActionResult Get(Guid id) { HireDTO hire = _hireService.GetHireById(id); return(Ok(hire)); }