fix: workspace cache version (#3999)
This commit is contained in:
@ -13,15 +13,13 @@ export class WorkspaceCacheVersionService {
|
|||||||
) {}
|
) {}
|
||||||
|
|
||||||
async incrementVersion(workspaceId: string): Promise<string> {
|
async incrementVersion(workspaceId: string): Promise<string> {
|
||||||
const workspaceCacheVersion = (await this.getVersion(workspaceId)) ?? {
|
const workspaceCacheVersion = (await this.getVersion(workspaceId)) ?? '0';
|
||||||
version: '0',
|
const newVersion = `${+workspaceCacheVersion + 1}`;
|
||||||
};
|
|
||||||
const newVersion = `${+workspaceCacheVersion.version + 1}`;
|
|
||||||
|
|
||||||
await this.workspaceCacheVersionRepository.upsert(
|
await this.workspaceCacheVersionRepository.upsert(
|
||||||
{
|
{
|
||||||
workspaceId,
|
workspaceId,
|
||||||
version: `${+workspaceCacheVersion.version + 1}`,
|
version: `${+workspaceCacheVersion + 1}`,
|
||||||
},
|
},
|
||||||
['workspaceId'],
|
['workspaceId'],
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user