mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-11-26 17:03:46 +03:00
feat: update invite function name
This commit is contained in:
parent
62826f7ab7
commit
7e77175679
@ -255,12 +255,17 @@ export class DataCenter {
|
||||
}
|
||||
}
|
||||
|
||||
public async inviteMember(id: string, email: string) {
|
||||
const workspaceInfo = this._workspaceUnitCollection.find(id);
|
||||
/**
|
||||
* invite the new member to the workspace
|
||||
* @param {string} workspaceId workspace id
|
||||
* @param {string} email
|
||||
*/
|
||||
public async inviteMember(workspaceId: string, email: string) {
|
||||
const workspaceInfo = this._workspaceUnitCollection.find(workspaceId);
|
||||
assert(workspaceInfo, 'Workspace not found');
|
||||
const provider = this.providerMap.get(workspaceInfo.provider);
|
||||
if (provider) {
|
||||
await provider.invite(id, email);
|
||||
await provider.invite(workspaceId, email);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user