lrf402788946 il y a 4 ans
Parent
commit
54bde54581
1 fichiers modifiés avec 2 ajouts et 1 suppressions
  1. 2 1
      app/service/user.js

+ 2 - 1
app/service/user.js

@@ -25,7 +25,8 @@ class UserService extends CrudService {
     //   throw new BusinessError(ErrorCode.DATA_EXISTED);
     // }
     const newdata = data;
-    newdata.passwd = { secret: passwd };
+    const pas = await this.createJwtPwd(passwd);
+    newdata.passwd = { secret: pas };
     const res = await this.model.create(newdata);
     return res;
   }