From 2601802b9e70a1bdd4d53504d9cf6625dab99ef9 Mon Sep 17 00:00:00 2001 From: satori Date: Mon, 31 Jan 2022 13:06:12 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AE=80=E5=8C=96=E5=88=97=E8=A1=A8=E9=99=84?= =?UTF-8?q?=E5=B8=A6=E7=9A=84=E7=94=A8=E6=88=B7=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 04a0f94..eb46aab 100644 --- a/index.js +++ b/index.js @@ -36,8 +36,10 @@ const list_load = async (name, query) => await new Promise(resolve => db(name).f const user_load = async (_id) => await new Promise(resolve => db('user').findOne({ _id }, function (err, doc) { if (!doc) return resolve(doc) - let { salt, password, mobile, email, ...user } = doc - return resolve(user) + // let { salt, password, mobile, email, ...user } = doc + // 这里只应提取有限简略信息附给列表, 因为个人信息中可能含有大量私有字段 + let { _id, gid, name, avatar } = doc + return resolve({ _id, gid, name, avatar }) })) // 通讯频道 Frequency Modulation