perf: 优化
This commit is contained in:
parent
0bf31c94b7
commit
0144f94edd
@ -1 +1 @@
|
||||
Subproject commit a9afc2ffea3dbe91a91e0e93c8ac0e6b8a71c5a6
|
||||
Subproject commit 79a9568a87536aa8e467182f371c95b8a2f25b8b
|
@ -213,6 +213,7 @@ app
|
||||
ctx.body = {
|
||||
key: app.key,
|
||||
version: app.version,
|
||||
appManager: am
|
||||
};
|
||||
})
|
||||
.addTo(app);
|
||||
|
@ -167,8 +167,11 @@ app
|
||||
if (!orgUser) {
|
||||
ctx.throw('org user not found');
|
||||
}
|
||||
if (orgUser.type !== 'org') {
|
||||
ctx.throw('change user is not org, please check');
|
||||
if (orgUser.type === 'user') {
|
||||
// 想转换的type===org, 但实际上这个用户名是一个用户, 比如org调用switchOrg root
|
||||
const token = await orgUser.createToken(null, loginType);
|
||||
ctx.body = token;
|
||||
return;
|
||||
}
|
||||
const user = await Org.findOne({ where: { username } });
|
||||
const users = user.users;
|
||||
|
Loading…
x
Reference in New Issue
Block a user