|
@@ -97,7 +97,7 @@ module.exports = {
|
|
|
.then((updatedMerchant)=>{
|
|
.then((updatedMerchant)=>{
|
|
|
updatedMerchant.password = undefined;
|
|
updatedMerchant.password = undefined;
|
|
|
updatedMerchant.accessToken = undefined;
|
|
updatedMerchant.accessToken = undefined;
|
|
|
- res.render("inventoryPage/inventory", {merchant: updatedMerchant, error: undefined});
|
|
|
|
|
|
|
+ res.render("dashboardPage/dashboard", {merchant: updatedMerchant, error: undefined});
|
|
|
Transaction.create(transactions);
|
|
Transaction.create(transactions);
|
|
|
return;
|
|
return;
|
|
|
})
|
|
})
|
|
@@ -105,18 +105,18 @@ module.exports = {
|
|
|
let errorMessage = "Error: unable to save user data";
|
|
let errorMessage = "Error: unable to save user data";
|
|
|
|
|
|
|
|
merchant.password = undefined;
|
|
merchant.password = undefined;
|
|
|
- return res.render("inventoryPage/inventory", {merchant: updatedMerchant, error: errorMessage});
|
|
|
|
|
|
|
+ return res.render("dashboardPage/dashboard", {merchant: updatedMerchant, error: errorMessage});
|
|
|
});
|
|
});
|
|
|
})
|
|
})
|
|
|
.catch((err)=>{
|
|
.catch((err)=>{
|
|
|
let errorMessage = "There was an error and we could not retrieve your transactions from Clover";
|
|
let errorMessage = "There was an error and we could not retrieve your transactions from Clover";
|
|
|
|
|
|
|
|
merchant.password = undefined;
|
|
merchant.password = undefined;
|
|
|
- return res.render("inventoryPage/inventory", {merchant: merchant, error: errorMessage});
|
|
|
|
|
|
|
+ return res.render("dashboardPage/dashboard", {merchant: merchant, error: errorMessage});
|
|
|
});
|
|
});
|
|
|
}else if(merchant.pos === "none"){
|
|
}else if(merchant.pos === "none"){
|
|
|
merchant.password = undefined;
|
|
merchant.password = undefined;
|
|
|
- return res.render("inventoryPage/inventory", {merchant: merchant, error: undefined});
|
|
|
|
|
|
|
+ return res.render("dashboardPage/dashboard", {merchant: merchant, error: undefined});
|
|
|
}else{
|
|
}else{
|
|
|
req.session.error = "Error: WEBSITE PANIC";
|
|
req.session.error = "Error: WEBSITE PANIC";
|
|
|
|
|
|