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);
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");
}
});
module.exports = router;