Skip to content

Commit

Permalink
pkg Excel fix
Browse files Browse the repository at this point in the history
  • Loading branch information
TuomoKu committed Dec 31, 2020
1 parent 938ec02 commit d7958c1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion routes/routes-api.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ router.post('/readExcelData', async (req, res) => {
// Data parsing / logic must be implemented in the template
// this just dumps data out as-is.

var excelFile = path.join(__dirname, '..', 'ASSETS', req.body.filename);
// var excelFile = path.join(__dirname, '..', 'ASSETS', req.body.filename); // fails when packaged
var excelFile = path.join(process.cwd(), 'ASSETS', req.body.filename);
var workSheetsData;
try {

Expand Down
2 changes: 1 addition & 1 deletion routes/routes-application.js
Original file line number Diff line number Diff line change
Expand Up @@ -740,7 +740,7 @@ router.post('/gc/playout', spxAuth.CheckLogin, async (req, res) => {
let RundownData = "" // file JSON
let preventSave = false;

console.log(req.body.prepopulated);
// console.log(req.body.prepopulated);

if (req.body.prepopulated && req.body.prepopulated=="true") {
// data in pre-generated coming in. So we can just pass that along.
Expand Down

0 comments on commit d7958c1

Please sign in to comment.