示例#1
0
        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)));
        }
示例#2
0
        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)));
        }