Skip to content
This repository has been archived by the owner on Jun 2, 2024. It is now read-only.

Commit

Permalink
fix sync status code error
Browse files Browse the repository at this point in the history
  • Loading branch information
dead-horse committed Apr 9, 2014
1 parent fa44097 commit 3646c2c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ var config = {
// load config/config.js, everything in config.js will cover the same key in index.js
var customConfig = path.join(root, 'config/config.js');
if (fs.existsSync(customConfig)) {
copy(require(customConfig)).toCover(config);
copy(require(customConfig)).override(config);
}

mkdirp.sync(config.logdir);
Expand All @@ -121,5 +121,5 @@ config.loadConfig = function (customConfig) {
if (!customConfig) {
return;
}
copy(customConfig).toCover(config);
copy(customConfig).override(config);
};
4 changes: 2 additions & 2 deletions controllers/sync.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ exports.sync = function *() {
var result = yield SyncModuleWorker.sync(name, username, options);

// friendly 404 reason info
if (result.staticCache === 404) {
if (result.statusCode === 404) {
this.status = 404;
this.body = {
ok: false,
Expand All @@ -48,7 +48,7 @@ exports.sync = function *() {
return;
}
if (!result.ok) {
this.status = result.statusCode;
this.status = result.statusCode || 500;
this.body = result.pkg;
return;
}
Expand Down

0 comments on commit 3646c2c

Please sign in to comment.