Merge pull request #86 from matiu/feature/10sync

Feature/10sync -- great!
This commit is contained in:
Gustavo Maximiliano Cortez 2014-01-20 05:30:26 -08:00
commit 441843a25f
3 changed files with 6 additions and 7 deletions

View File

@ -45,8 +45,7 @@ exports.show = function(req, res, next) {
}
};
exports.sync = function(req, res, next) {
exports.sync = function(req, res) {
if (req.syncInfo)
res.jsonp(req.syncInfo);
next();
};

View File

@ -274,11 +274,13 @@ function spec() {
});
}
if (!err)
sync();
else {
if (err) {
self.syncInfo = util._extend(self.syncInfo, { error: err.message });
return next(err, 0);
}
else {
sync();
}
});
};

View File

@ -4,8 +4,6 @@
process.env.NODE_ENV = process.env.NODE_ENV || 'development';
require('buffertools').extend();
var SYNC_VERSION = '0.1';
var program = require('commander');
var HistoricSync = require('../lib/HistoricSync').class();