lrf402788946 4 년 전
부모
커밋
7bb2fe4e99
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  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);