mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-11-30 15:42:49 +03:00
feat: rm business
This commit is contained in:
parent
e46cf6c543
commit
84bea54916
@ -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,
|
||||
|
@ -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,
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user