fix; remover user error and add log
This commit is contained in:
parent
ae829c6181
commit
e41749404b
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@kevisual/code-center-module",
|
||||
"version": "0.0.10",
|
||||
"version": "0.0.11-alpha.1",
|
||||
"description": "",
|
||||
"main": "dist/system.mjs",
|
||||
"module": "dist/system.mjs",
|
||||
|
@ -69,6 +69,12 @@ export class Org extends Model {
|
||||
users.push({ role: opts?.role || 'member', uid: user.id });
|
||||
}
|
||||
await Org.update({ users }, { where: { id: this.id } });
|
||||
|
||||
console.log(
|
||||
'org users',
|
||||
this.username,
|
||||
users.map((u) => [u.uid, u.role]),
|
||||
);
|
||||
}
|
||||
/**
|
||||
* operateId 是真实操作者的id
|
||||
@ -88,7 +94,12 @@ export class Org extends Model {
|
||||
}
|
||||
}
|
||||
await user.expireOrgs();
|
||||
const users = this.users.filter((u) => u.uid !== user.id || u.role !== 'owner');
|
||||
const users = this.users.filter((u) => u.uid !== user.id || u.role === 'owner');
|
||||
console.log(
|
||||
'org users',
|
||||
this.username,
|
||||
users.map((u) => [u.uid, u.role]),
|
||||
);
|
||||
await Org.update({ users }, { where: { id: this.id } });
|
||||
}
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user