changed request

This commit is contained in:
plane000
2018-07-21 20:08:59 +01:00
parent d633cbe2f9
commit 997e2e95af

View File

@@ -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,