public async Task <ActionResult <EmployeeApiModel> > Get(int id, CancellationToken ct = default) { try { var employee = await _BlazorSupervisor.GetEmployeeByIdAsync(id, ct); if (employee == null) { return(NotFound()); } return(Ok(employee)); } catch (Exception ex) { return(StatusCode(500, ex)); } }
public async Task <ActionResult <CustomerApiModel> > GetBySupportRepId(int id, CancellationToken ct = default) { try { var rep = await _BlazorSupervisor.GetEmployeeByIdAsync(id, ct); if (rep == null) { return(NotFound()); } return(Ok(rep)); } catch (Exception ex) { return(StatusCode(500, ex)); } }