fix: enable workspace upload avatar

This commit is contained in:
DiamondThree
2023-02-02 19:48:02 +08:00
parent 8141ef1f91
commit e306408b56
2 changed files with 3 additions and 4 deletions

View File

@@ -397,7 +397,6 @@ export class AffineProvider extends BaseProvider {
provider: this.id,
syncMode: 'core',
});
await migrateBlobDB(workspaceUnit.id, id);
const blocksuiteWorkspace = createBlocksuiteWorkspace(id);

View File

@@ -66,7 +66,7 @@ export const migrateBlobDB = async (
newWorkspaceId: string
) => {
const oldDB = getDatabase('blob', oldWorkspaceId);
const oldPendingDB = getDatabase<PendingTask>('pending', newWorkspaceId);
const oldPendingDB = getDatabase<PendingTask>('pending', oldWorkspaceId);
const newDB = getDatabase('blob', newWorkspaceId);
const newPendingDB = getDatabase<PendingTask>('pending', newWorkspaceId);
@@ -82,6 +82,6 @@ export const migrateBlobDB = async (
return [id, { id, blob }] as [string, PendingTask];
});
await newPendingDB.setMany(pendingEntries);
await oldDB.clear();
await oldPendingDB.clear();
oldDB.clear();
oldPendingDB.clear();
};