From 6929bda2b40780189f7f35fed34e04a170d5d785 Mon Sep 17 00:00:00 2001 From: srfrnk Date: Thu, 8 Mar 2018 16:05:14 +0200 Subject: [PATCH] fix: hopefully fixes #162 --- server/controllers/MissionController.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/server/controllers/MissionController.js b/server/controllers/MissionController.js index a0b32028..0eb57db0 100644 --- a/server/controllers/MissionController.js +++ b/server/controllers/MissionController.js @@ -5,6 +5,11 @@ const { getVehicle, updateVehicleStatus } = require('../store/vehicles'); const command = async (req, res) => { const { user_id, mission_id, command} = req.query; + if(mission_id==="undefined") + { + res.sendStatus(404); + return; + } let mission = await getMission(mission_id); let vehicle = await getVehicle(mission.vehicle_id);