|
@@ -6,6 +6,7 @@ const Helper = require("./helper.js");
|
|
|
const Validator = require("./validator.js");
|
|
const Validator = require("./validator.js");
|
|
|
|
|
|
|
|
const xlsx = require("xlsx");
|
|
const xlsx = require("xlsx");
|
|
|
|
|
+const fs = require("fs");
|
|
|
module.exports = {
|
|
module.exports = {
|
|
|
//GET - gets a list of all database ingredients
|
|
//GET - gets a list of all database ingredients
|
|
|
//Returns:
|
|
//Returns:
|
|
@@ -199,6 +200,7 @@ module.exports = {
|
|
|
|
|
|
|
|
createFromSpreadsheet: function(req, res){
|
|
createFromSpreadsheet: function(req, res){
|
|
|
let workbook = xlsx.readFile(req.file.path);
|
|
let workbook = xlsx.readFile(req.file.path);
|
|
|
|
|
+ fs.unlink(req.file.path, ()=>{});
|
|
|
console.log(workbook);
|
|
console.log(workbook);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|