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()); }