Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fixed a bug

  • Loading branch information...
commit 02868f996b05424d37f1245c054dcea0eec93407 1 parent 1cb8d1d
@troygoode troygoode authored
Showing with 7 additions and 7 deletions.
  1. +7 −7 app.js
View
14 app.js
@@ -4,15 +4,15 @@ var express = require('express')
secret: (process.env.SECRET || 'i can haz sekrets?')
}
, repos = {
- cart: require('./cart'),
- orders: require('./orders'),
- products: require('./products')
+ cart: new (require('./cart'))(),
+ orders: new (require('./orders'))(),
+ products: new (require('./products'))()
}
, routes = {
- admin: require('./routes/admin')(new repos.orders()),
- cart: require('./routes/cart')(new repos.cart()),
- checkout: require('./routes/checkout')(new repos.cart(), new repos.orders()),
- product: require('./routes/product')(new repos.products())
+ admin: require('./routes/admin')(repos.orders),
+ cart: require('./routes/cart')(repos.cart),
+ checkout: require('./routes/checkout')(repos.cart, repos.orders),
+ product: require('./routes/product')(repos.products)
};
var app = module.exports = express.createServer();
Please sign in to comment.
Something went wrong with that request. Please try again.