fix: enable workspace upload avatar
This commit is contained in:
@@ -397,7 +397,6 @@ export class AffineProvider extends BaseProvider {
|
|||||||
provider: this.id,
|
provider: this.id,
|
||||||
syncMode: 'core',
|
syncMode: 'core',
|
||||||
});
|
});
|
||||||
|
|
||||||
await migrateBlobDB(workspaceUnit.id, id);
|
await migrateBlobDB(workspaceUnit.id, id);
|
||||||
|
|
||||||
const blocksuiteWorkspace = createBlocksuiteWorkspace(id);
|
const blocksuiteWorkspace = createBlocksuiteWorkspace(id);
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ export const migrateBlobDB = async (
|
|||||||
newWorkspaceId: string
|
newWorkspaceId: string
|
||||||
) => {
|
) => {
|
||||||
const oldDB = getDatabase('blob', oldWorkspaceId);
|
const oldDB = getDatabase('blob', oldWorkspaceId);
|
||||||
const oldPendingDB = getDatabase<PendingTask>('pending', newWorkspaceId);
|
const oldPendingDB = getDatabase<PendingTask>('pending', oldWorkspaceId);
|
||||||
|
|
||||||
const newDB = getDatabase('blob', newWorkspaceId);
|
const newDB = getDatabase('blob', newWorkspaceId);
|
||||||
const newPendingDB = getDatabase<PendingTask>('pending', newWorkspaceId);
|
const newPendingDB = getDatabase<PendingTask>('pending', newWorkspaceId);
|
||||||
@@ -82,6 +82,6 @@ export const migrateBlobDB = async (
|
|||||||
return [id, { id, blob }] as [string, PendingTask];
|
return [id, { id, blob }] as [string, PendingTask];
|
||||||
});
|
});
|
||||||
await newPendingDB.setMany(pendingEntries);
|
await newPendingDB.setMany(pendingEntries);
|
||||||
await oldDB.clear();
|
oldDB.clear();
|
||||||
await oldPendingDB.clear();
|
oldPendingDB.clear();
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user