feat: rm business

This commit is contained in:
MingLiang Wang 2023-01-09 12:02:09 +08:00
parent e46cf6c543
commit 84bea54916
2 changed files with 2 additions and 4 deletions

View File

@ -12,7 +12,7 @@ import { applyUpdate, encodeStateAsUpdate } from 'yjs';
/**
* @class DataCenter
* @classdesc DataCenter is a data center, it can manage different providers for business
* @classdesc Data center is made for managing different providers for business
*/
export class DataCenter {
private readonly _workspaces = new Workspaces();
@ -284,6 +284,7 @@ export class DataCenter {
const newProvider = this.providerMap.get(providerId);
assert(newProvider, `provide '${providerId}' is not registered`);
this._logger(`create ${providerId} workspace: `, workspaceInfo.name);
// TODO optimize this function
const newWorkspace = await newProvider.createWorkspace({
name: workspaceInfo.name,
avatar: workspaceInfo.avatar,

View File

@ -4,11 +4,9 @@ export type { Callback } from './token.js';
import { getAuthorizer } from './token.js';
import * as user from './user.js';
import * as workspace from './workspace.js';
import * as business from './business.js';
export type Apis = typeof user &
typeof workspace & {
business: typeof business;
signInWithGoogle: ReturnType<typeof getAuthorizer>[0];
onAuthStateChanged: ReturnType<typeof getAuthorizer>[1];
};
@ -18,7 +16,6 @@ export const getApis = (): Apis => {
return {
...user,
...workspace,
business,
signInWithGoogle,
onAuthStateChanged,
};