lrf402788946 4 năm trước cách đây
mục cha
commit
7bb2fe4e99
1 tập tin đã thay đổi với 1 bổ sung0 xóa
  1. 1 0
      app/service/users/organization.js

+ 1 - 0
app/service/users/organization.js

@@ -114,6 +114,7 @@ class OrganizationService extends CrudService {
    */
   async wxLogin({ openid }) {
     const org = await this.model.findOne({ openid });
+    if (!org) return org;
     const data = _.omit(JSON.parse(JSON.stringify(org)), [ 'meta', 'password', '__v' ]);
     const { secret: secrets } = this.config.jwt;
     const token = jwt.sign(data, secrets);