public async Task <ActionResult <IEnumerable <PickUp> > > Get() { int?baseId = _userService.GetBaseIdClaim(HttpContext.User.Identity as ClaimsIdentity); if (baseId == null || !await _scheduleService.BaseIdExist(baseId.Value)) { return(NotFound()); } return(Ok(await _scheduleService.GetAllPickUps(baseId.Value))); }
public async Task <ActionResult <IEnumerable <object> > > Get() { int?baseId = _userService.GetBaseIdClaim(HttpContext.User.Identity as ClaimsIdentity); if (baseId == null) { return(Unauthorized()); } if (!await _scheduleService.BaseIdExist(baseId.Value)) { return(NotFound()); } return(Ok(await _scheduleService.GetAllDeliveries(baseId.Value))); }