Kaynağa Gözat

没有密码,会引发错误

lrf 1 yıl önce
ebeveyn
işleme
639cd6f0a1
1 değiştirilmiş dosya ile 6 ekleme ve 6 silme
  1. 6 6
      app/service/user.js

+ 6 - 6
app/service/user.js

@@ -23,12 +23,12 @@ class UserService extends CrudService {
     }
     let res = await this.model.find(query, '+passwd', newoptions).exec();
     res = JSON.parse(JSON.stringify(res));
-    for (const user of res) {
-      if (user) {
-        const { passwd } = user;
-        user.passwd = passwd.secret;
-      }
-    }
+    // for (const user of res) {
+    //   if (user) {
+    //     const { passwd } = user;
+    //     user.passwd = passwd.secret;
+    //   }
+    // }
     return res;
   }
   async count({ name, ...info }) {