fix: fix switch orgUser is not org
This commit is contained in:
@@ -167,6 +167,9 @@ app
|
||||
if (!orgUser) {
|
||||
ctx.throw('org user not found');
|
||||
}
|
||||
if (orgUser.type !== 'org') {
|
||||
ctx.throw('change user is not org, please check');
|
||||
}
|
||||
const user = await Org.findOne({ where: { username } });
|
||||
const users = user.users;
|
||||
const index = users.findIndex((u) => u.uid === me.id);
|
||||
|
||||
Reference in New Issue
Block a user