mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-25 22:38:56 +08:00
fix: fix init head icon
This commit is contained in:
@@ -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);
|
||||
// }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user