mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-04 21:15:55 +01:00
closes #590
This commit is contained in:
@@ -351,15 +351,17 @@ var fs = require('fs'),
|
||||
}
|
||||
|
||||
user.getUserFields(uid, ['username', 'userslug'], function (err, userData) {
|
||||
if (err)
|
||||
if (err) {
|
||||
return next(err);
|
||||
}
|
||||
|
||||
if (userData) {
|
||||
posts.getFavourites(uid, function (err, posts) {
|
||||
if (err)
|
||||
if (err) {
|
||||
return next(err);
|
||||
}
|
||||
userData.posts = posts;
|
||||
userData.show_nofavourites = posts.length ? 'hide' : 'show';
|
||||
userData.show_nofavourites = posts.length === 0;
|
||||
res.json(userData);
|
||||
});
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user