Skip to content

Commit

Permalink
小重构
Browse files Browse the repository at this point in the history
  • Loading branch information
alsotang committed Nov 7, 2014
1 parent 87f20c3 commit 06c5dc4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion proxy/message.js
Expand Up @@ -35,6 +35,7 @@ exports.getMessageById = function (id, callback) {
}
if (message.type === 'reply' || message.type === 'reply2' || message.type === 'at') {
var proxy = new EventProxy();
proxy.fail(callback);
proxy.assign('author_found', 'topic_found', 'reply_found', function (author, topic, reply) {
message.author = author;
message.topic = topic;
Expand All @@ -43,7 +44,7 @@ exports.getMessageById = function (id, callback) {
message.is_invalid = true;
}
return callback(null, message);
}).fail(callback); // 接收异常
}); // 接收异常
User.getUserById(message.author_id, proxy.done('author_found'));
Topic.getTopicById(message.topic_id, proxy.done('topic_found'));
Reply.getReplyById(message.reply_id, proxy.done('reply_found'));
Expand Down

0 comments on commit 06c5dc4

Please sign in to comment.