feat: update invite function name

This commit is contained in:
MingLiang Wang 2023-01-11 17:30:16 +08:00
parent 62826f7ab7
commit 7e77175679

View File

@ -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);
}
}