Skip to content
This repository has been archived by the owner on Jan 25, 2020. It is now read-only.

Commit

Permalink
Fixed eslint issues, added favicon.ico file (#21)
Browse files Browse the repository at this point in the history
* Fixed eslint issues, added favicon.ico file

* changed npm-debug.log to *.log
  • Loading branch information
clayboyd authored and grawk committed Oct 18, 2016
1 parent f48c2af commit 8a6caa2
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 13 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
node_modules
.build
.idea

*.log
public/bundle.js
25 changes: 13 additions & 12 deletions controllers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,16 @@ var modelBuilder = function (req, res, callback) {
model.cart = result.cart;
callback(null, model);
});
}
};

module.exports.cart = function (req, res, next) {

//Load (or initialize) the cart
req.session.cart = req.session.cart || {};
var cart = req.session.cart;

//Read the incoming product data
var id = req.param('item_id');
var id = req.body.item_id;

//Locate the product to be added
Product.findById(id, function (err, prod) {
Expand Down Expand Up @@ -130,7 +131,7 @@ module.exports.setLocale = function (req, res) {
res.redirect('/');
};

module.exports.newProduct = function (req, res) {
module.exports.newProduct = function (req, res, next) {
var name = req.body.name && req.body.name.trim();

//***** PLEASE READ THIS COMMENT ******\\\
Expand Down Expand Up @@ -192,15 +193,15 @@ module.exports.deleteProduct = function (req, res, next) {
});
};

module.exports.pay = function (req, res) {
module.exports.pay = function (req, res, next) {

//Read the incoming product data
var cc = req.param('cc');
var firstName = req.param('firstName');
var lastName = req.param('lastName');
var expMonth = req.param('expMonth');
var expYear = req.param('expYear');
var cvv = req.param('cvv');
var cc = req.body.cc;
var firstName = req.body.firstName;
var lastName = req.body.lastName;
var expMonth = req.body.expMonth;
var expYear = req.body.expYear;
var cvv = req.body.cvv;

//Ready the payment information to pass to the PayPal library
var payment = {
Expand Down Expand Up @@ -257,10 +258,10 @@ module.exports.pay = function (req, res) {
return next(err);
}
model.cart.result = res.bundle.get('paymentSuccess');
model.cart.continueMessage = res.bundle.get('keepShopping')
model.cart.continueMessage = res.bundle.get('keepShopping');
res.status(200).json(model);
});

}
});
};
};
Binary file added public/favicon.ico
Binary file not shown.

0 comments on commit 8a6caa2

Please sign in to comment.