From c884bd9c77cc907c60b5b1d1857f081167fcd6ab Mon Sep 17 00:00:00 2001 From: Dan Date: Fri, 29 Sep 2017 00:24:39 -0600 Subject: [PATCH] Fix error preventing calendar images from being created --- Server/src/routes/api/api.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Server/src/routes/api/api.js b/Server/src/routes/api/api.js index a70e4d4..792af42 100644 --- a/Server/src/routes/api/api.js +++ b/Server/src/routes/api/api.js @@ -30,6 +30,7 @@ router.get('/cim/:month/:day',function(req,res){ res.sendFile(file); return; } + console.log(process.platform); if (process.platform != 'win32'){ child = execFile(dir + '/calendar_image_maker/bin/phantomjs', [dir + '/calendar_image_maker/script.js', req.params.month, req.params.day], (error, stdout, stderr) => { console.log("MAKE"); @@ -43,8 +44,10 @@ router.get('/cim/:month/:day',function(req,res){ res.error("Error"); } }); + } else { + res.send("WIN"); } - res.send("WIN"); + }); module.exports = router; \ No newline at end of file