@fabrix/spool-cart
Version:
Spool - eCommerce Spool for Fabrix
17 lines (16 loc) • 514 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.authenticate = function (cart, options, callback) {
if (typeof options === 'function') {
callback = options;
options = {};
}
options = options || {};
return function auth(req, res, next) {
require('../framework/connect').__monkeypatchNode();
if (!req._cart) {
return this.error(new Error('cart.initialize() middleware not in use'));
}
next();
};
};