mirror of
https://github.com/docmost/docmost.git
synced 2026-08-25 07:22:14 +10:00
fix(integrations): don't filter per-user connections out of existing lookups
This commit is contained in:
@@ -35,7 +35,6 @@ export class IntegrationConnectionRepo {
|
|||||||
.selectAll()
|
.selectAll()
|
||||||
.where('integrationId', '=', integrationId)
|
.where('integrationId', '=', integrationId)
|
||||||
.where('userId', '=', userId)
|
.where('userId', '=', userId)
|
||||||
.where('kind', '=', 'workspace')
|
|
||||||
.executeTakeFirst();
|
.executeTakeFirst();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -58,7 +57,6 @@ export class IntegrationConnectionRepo {
|
|||||||
.where('integrations.type', '=', integrationType)
|
.where('integrations.type', '=', integrationType)
|
||||||
.where('integrations.deletedAt', 'is', null)
|
.where('integrations.deletedAt', 'is', null)
|
||||||
.where('integrationConnections.userId', '=', userId)
|
.where('integrationConnections.userId', '=', userId)
|
||||||
.where('integrationConnections.kind', '=', 'workspace')
|
|
||||||
.executeTakeFirst();
|
.executeTakeFirst();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -160,7 +158,6 @@ export class IntegrationConnectionRepo {
|
|||||||
.where('refreshToken', 'is not', null)
|
.where('refreshToken', 'is not', null)
|
||||||
.where('tokenExpiresAt', 'is not', null)
|
.where('tokenExpiresAt', 'is not', null)
|
||||||
.where('tokenExpiresAt', '<', threshold)
|
.where('tokenExpiresAt', '<', threshold)
|
||||||
.where('kind', '=', 'workspace')
|
|
||||||
.execute();
|
.execute();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user