Esempio n. 1
0
        public async Task <IActionResult> ModifyCrew([FromBody] long crewId,
                                                     [FromBody] long pilotId, [FromBody] IEnumerable <long> stewardressesIds)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest() as IActionResult);
            }

            var entity = await service.ReformCrewAsync(crewId, pilotId, stewardressesIds);

            return(entity == null?StatusCode(304) as IActionResult
                   : Ok(mapper.Map <CrewDTO>(entity)));
        }