lrf402788946 4 lat temu
rodzic
commit
54bde54581
1 zmienionych plików z 2 dodań i 1 usunięć
  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;
   }