mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-02 12:05:57 +01:00
simplified flags.get a tad
This commit is contained in:
@@ -30,7 +30,7 @@ Flags.get = function (flagId, callback) {
|
||||
function (data, next) {
|
||||
// Second stage
|
||||
async.parallel({
|
||||
userObj: async.apply(user.getUserFields, data.base.uid, ['username', 'picture']),
|
||||
userObj: async.apply(user.getUserFields, data.base.uid, ['username', 'userslug', 'picture']),
|
||||
targetObj: async.apply(Flags.getTarget, data.base.type, data.base.targetId, data.base.uid)
|
||||
}, function (err, payload) {
|
||||
// Final object return construction
|
||||
@@ -40,12 +40,7 @@ Flags.get = function (flagId, callback) {
|
||||
target: payload.targetObj,
|
||||
history: data.history,
|
||||
notes: data.notes,
|
||||
reporter: {
|
||||
username: payload.userObj.username,
|
||||
picture: payload.userObj.picture,
|
||||
'icon:bgColor': payload.userObj['icon:bgColor'],
|
||||
'icon:text': payload.userObj['icon:text']
|
||||
}
|
||||
reporter: payload.userObj
|
||||
}));
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user