Ejemplo n.º 1
0
        public async Task <IActionResult> EditAirline(AirlineParameter airline)
        {
            var temp = await service.CheckAdmin(User.Identity.Name, airline.Id);

            if (temp.Success)
            {
                var ret = await service.EditAirlineAsync(airline);

                return(Ok(mapper.Map <AirlineResource>(ret)));
            }
            else
            {
                return(BadRequest(new { Message = temp.Message }));
            }
        }