added err check

v1.18.x
barisusakli 11 years ago
parent aea8d50200
commit 6f40393b99

@ -63,6 +63,10 @@ var async = require('async'),
}
user.getNameSlugPicture(topic.uid, function(err, userData) {
if (err) {
return callback(err);
}
topic.user = userData;
callback(err, topic);
});

@ -126,10 +126,10 @@ module.exports = function(User) {
};
db.setObject('user:' + uid, userData, function(err) {
if(err) {
return callback(err);
}
db.setObjectField('username:uid', userData.username, uid);
db.setObjectField('userslug:uid', userData.userslug, uid);

Loading…
Cancel
Save