public async Task <ActionResult <ShiftDto> > ExpireShifts(List <int> ids) { var locationIds = await ShiftService.GetShiftsLocations(ids); if (locationIds.Count != 1) { return(BadRequest(CannotUpdateCrossLocationError)); } if (!PermissionDataFiltersExtensions.HasAccessToLocation(User, Db, locationIds.First())) { return(Forbid()); } await ShiftService.ExpireShifts(ids); return(NoContent()); }