Ejemplo n.º 1
0
        public async Task <ActionResult> UpdateLocation([FromBody] int planetId, int shipId)
        {
            var ship = await _shipService.GetShipById(shipId);

            if (ship != null)
            {
                var result = await _shipService.UpdateShipLocation(ship, planetId);

                if (!result)
                {
                    return(BadRequest());
                }
                return(Ok());
            }
            return(BadRequest());
        }