fix: fix init head icon

This commit is contained in:
MingLiang Wang
2023-01-09 15:26:30 +08:00
parent 51129bf14d
commit b46a7fc8ce
4 changed files with 48 additions and 44 deletions
+16 -19
View File
@@ -17,7 +17,6 @@ import { applyUpdate, encodeStateAsUpdate } from 'yjs';
export class DataCenter {
private readonly _workspaces = new Workspaces();
private readonly _logger = getLogger('dc');
private readonly _blobStorage: BlobStorage = new BlobStorage();
/**
* A mainProvider must exist as the only data trustworthy source.
*/
@@ -35,14 +34,12 @@ export class DataCenter {
new LocalProvider({
logger: dc._logger,
workspaces: dc._workspaces.createScope(),
blobs: dc._blobStorage,
})
);
dc.registerProvider(
new AffineProvider({
logger: dc._logger,
workspaces: dc._workspaces.createScope(),
blobs: dc._blobStorage,
})
);
@@ -335,21 +332,21 @@ export class DataCenter {
return;
}
/**
* get blob url by workspaces id
* @param id
* @returns {Promise<string | null>} blob url
*/
async getBlob(id: string): Promise<string | null> {
return await this._blobStorage.get(id);
}
// /**
// * get blob url by workspaces id
// * @param id
// * @returns {Promise<string | null>} blob url
// */
// async getBlob(id: string): Promise<string | null> {
// return await this._blobStorage.get(id);
// }
/**
* up load blob and get a blob url
* @param id
* @returns {Promise<string | null>} blob url
*/
async setBlob(blob: Blob): Promise<string> {
return await this._blobStorage.set(blob);
}
// /**
// * up load blob and get a blob url
// * @param id
// * @returns {Promise<string | null>} blob url
// */
// async setBlob(blob: Blob): Promise<string> {
// return await this._blobStorage.set(blob);
// }
}