|
@@ -56,10 +56,8 @@ class LoginService extends CrudService {
|
|
|
_userid = uid.toString();
|
|
|
res = await this.stuModel.findById(_userid);
|
|
|
}
|
|
|
- res.userid = _userid;
|
|
|
- res.openid = openid;
|
|
|
- res.type = type;
|
|
|
- const token = await jwt.sign(...res, secret, { expiresIn, issuer, subject });
|
|
|
+ const newdata = { userid: _userid, ...res, openid, type };
|
|
|
+ const token = await jwt.sign(newdata, secret, { expiresIn, issuer, subject });
|
|
|
return token;
|
|
|
}
|
|
|
|