|
@@ -1,5 +1,7 @@
|
|
|
const Merchant = require("./models/merchant.js")
|
|
const Merchant = require("./models/merchant.js")
|
|
|
|
|
|
|
|
|
|
+const helper = require("./controllers/helper.js");
|
|
|
|
|
+
|
|
|
module.exports = {
|
|
module.exports = {
|
|
|
verifySession: function(req, res, next){
|
|
verifySession: function(req, res, next){
|
|
|
if(req.session.user === undefined) {
|
|
if(req.session.user === undefined) {
|
|
@@ -12,7 +14,6 @@ module.exports = {
|
|
|
if(merchant === null){
|
|
if(merchant === null){
|
|
|
throw "no merchant";
|
|
throw "no merchant";
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
|
|
|
if(merchant.session.date < new Date()){
|
|
if(merchant.session.date < new Date()){
|
|
|
let newExpiration = new Date();
|
|
let newExpiration = new Date();
|