mirror of
https://github.com/docmost/docmost.git
synced 2026-08-24 22:02:14 +10:00
fix(integration): purge per-user unfurl cache on disconnect
This commit is contained in:
@@ -2,12 +2,14 @@ import { Injectable, NotFoundException } from '@nestjs/common';
|
||||
import { IntegrationConnectionRepo } from './repos/integration-connection.repo';
|
||||
import { IntegrationRepo } from './repos/integration.repo';
|
||||
import { IntegrationConnection } from '@docmost/db/types/entity.types';
|
||||
import { UnfurlService } from './unfurl/unfurl.service';
|
||||
|
||||
@Injectable()
|
||||
export class IntegrationConnectionService {
|
||||
constructor(
|
||||
private readonly connectionRepo: IntegrationConnectionRepo,
|
||||
private readonly integrationRepo: IntegrationRepo,
|
||||
private readonly unfurlService: UnfurlService,
|
||||
) {}
|
||||
|
||||
async getConnectionStatus(
|
||||
@@ -79,5 +81,7 @@ export class IntegrationConnectionService {
|
||||
integrationId,
|
||||
userId,
|
||||
);
|
||||
|
||||
await this.unfurlService.purgeUserCache(workspaceId, userId);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user