fix: 隐藏信息

This commit is contained in:
chaosBreaking
2019-09-08 11:03:37 +08:00
parent cd63a4f5b4
commit 84d832d859
3 changed files with 12 additions and 3 deletions

View File

@@ -49,7 +49,7 @@ module.exports = {
},
async getGroup (req, res) {
const { userId } = res.locals.user;
User.find({ inviter: userId }).then(data => {
return User.find({ inviter: userId }, 'id nickname phone').then(data => {
res.json({
code: 0,
msg: 'success',
@@ -137,7 +137,7 @@ module.exports = {
},
async getGroupList (req, res) {
const { userId } = res.locals.user;
const list = await User.find({ inviter: userId }).exec();
const list = await User.find({ inviter: userId }, 'id nickname phone').exec();
return res.json({
code: 0,
data: list