flowstate
Advanced tools
Comparing version 0.1.3 to 0.2.0
@@ -6,2 +6,3 @@ exports.Manager = require('./manager'); | ||
exports.resume = require('./middleware/resume'); | ||
exports.resumeError = require('./middleware/resumeError'); | ||
exports.clean = require('./middleware/clean'); |
@@ -24,6 +24,6 @@ var flatten = require('utils-flatten'); | ||
dispatch(flow.begin)(req, res, next); | ||
dispatch(flow.begin)(null, req, res, next); | ||
} | ||
Manager.prototype.resume = function(name, req, res, next) { | ||
Manager.prototype._resume = function(name, err, req, res, next) { | ||
var flow = this._flows[name]; | ||
@@ -33,3 +33,3 @@ if (!flow) { throw new Error("Cannot find flow '" + name + "'"); } | ||
dispatch(flow.resume)(req, res, next); | ||
dispatch(flow.resume)(err, req, res, next); | ||
} | ||
@@ -36,0 +36,0 @@ |
@@ -48,3 +48,3 @@ var SessionStore = require('../stores/session'); | ||
try { | ||
flows.resume(name, req, res, next); | ||
flows._resume(name, null, req, res, next); | ||
} catch(ex) { | ||
@@ -51,0 +51,0 @@ return next(ex); |
exports.dispatch = function(stack) { | ||
return function(req, res, next) { | ||
return function(err, req, res, next) { | ||
var i = 0; | ||
@@ -23,4 +23,4 @@ | ||
} | ||
callbacks(); | ||
callbacks(err); | ||
} | ||
} |
{ | ||
"name": "flowstate", | ||
"version": "0.1.3", | ||
"version": "0.2.0", | ||
"description": "Stateful, transactional flows using page-based navigation.", | ||
@@ -5,0 +5,0 @@ "author": { |
11181
12
263