Fix error preventing calendar images from being created

Transactions
Dan 2017-09-29 00:24:39 -06:00
parent c22e9c4c53
commit c884bd9c77
1 changed files with 4 additions and 1 deletions

View File

@ -30,6 +30,7 @@ router.get('/cim/:month/:day',function(req,res){
res.sendFile(file); res.sendFile(file);
return; return;
} }
console.log(process.platform);
if (process.platform != 'win32'){ 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) => { 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"); console.log("MAKE");
@ -43,8 +44,10 @@ router.get('/cim/:month/:day',function(req,res){
res.error("Error"); res.error("Error");
} }
}); });
} else {
res.send("WIN");
} }
res.send("WIN");
}); });
module.exports = router; module.exports = router;