- Accepted and Refused Group Entering
- Report a User
This commit is contained in:
@@ -18,9 +18,11 @@ const {ObjectID} = require('mongodb');
|
||||
|
||||
async function getGroupRecAdminsInfo(idapp, data) {
|
||||
|
||||
for (const admin of data.admins) {
|
||||
const myuser = await User.findOne({idapp, username: admin.username}).lean();
|
||||
admin.profile = { img: myuser.profile.img };
|
||||
if (data && data.admins) {
|
||||
for (const admin of data.admins) {
|
||||
const myuser = await User.findOne({idapp, username: admin.username}, {'profile.img': 1}).lean();
|
||||
admin.profile = {img: myuser.profile.img};
|
||||
}
|
||||
}
|
||||
|
||||
return data;
|
||||
|
||||
Reference in New Issue
Block a user