From 997e2e95afca7d957d55144659c9fc6ae0fb4a56 Mon Sep 17 00:00:00 2001 From: plane000 Date: Sat, 21 Jul 2018 20:08:59 +0100 Subject: [PATCH] changed request --- print.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/print.js b/print.js index f6febf3..a134d58 100644 --- a/print.js +++ b/print.js @@ -31,7 +31,10 @@ module.exports.print = async function() { async function currentprint(name, coords, req, res) { let currentWeather = await WeatherAPI.getWeather(1, coords); let todaysForcast = await WeatherAPI.getWeather(2, coords); - if (currentWeather == -1 || todaysForcast == -1) res.end('400 BAD REQUEST: INVALID COORDINATES'); + if (currentWeather == -1 || todaysForcast == -1) { + res.end('400 BAD REQUEST: INVALID COORDINATES'); + return; + } let text = Result.genCompilerSettings({ padding: 2,