mirror of
https://github.com/cool-team-official/cool-admin-midway.git
synced 2024-11-01 22:20:30 +08:00
Merge branch '6.x' of https://e.coding.net/shancool/cool-admin/midway into 6.x
This commit is contained in:
commit
a78a0e645d
@ -72,7 +72,7 @@ export class UserLoginService extends BaseService {
|
|||||||
await this.userInfoEntity.insert(user);
|
await this.userInfoEntity.insert(user);
|
||||||
}
|
}
|
||||||
return this.token({ id: user.id });
|
return this.token({ id: user.id });
|
||||||
}else{
|
} else {
|
||||||
throw new CoolCommException('验证码错误');
|
throw new CoolCommException('验证码错误');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -177,9 +177,9 @@ export class UserLoginService extends BaseService {
|
|||||||
throw new CoolCommException('token类型非refreshToken');
|
throw new CoolCommException('token类型非refreshToken');
|
||||||
}
|
}
|
||||||
const userInfo = await this.userInfoEntity.findOneBy({
|
const userInfo = await this.userInfoEntity.findOneBy({
|
||||||
id: info['userId'],
|
id: info['id'],
|
||||||
});
|
});
|
||||||
return this.token(userInfo);
|
return this.token({ id: userInfo.id });
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
throw new CoolCommException(
|
throw new CoolCommException(
|
||||||
'刷新token失败,请检查refreshToken是否正确或过期'
|
'刷新token失败,请检查refreshToken是否正确或过期'
|
||||||
|
Loading…
Reference in New Issue
Block a user