diff --git a/connectors/src/api/webhooks/webhook_intercom.ts b/connectors/src/api/webhooks/webhook_intercom.ts index 8968e3ef02bd..c28f07c9023f 100644 --- a/connectors/src/api/webhooks/webhook_intercom.ts +++ b/connectors/src/api/webhooks/webhook_intercom.ts @@ -102,7 +102,7 @@ const _webhookIntercomAPIHandler = async ( return res.status(200).end(); } - if (connector?.isPaused()) { + if (connector.isPaused()) { logger.info( { connectorId: connector.id, diff --git a/connectors/src/resources/connector_resource.ts b/connectors/src/resources/connector_resource.ts index 157e15c98ad5..c1cf2ae61ae8 100644 --- a/connectors/src/resources/connector_resource.ts +++ b/connectors/src/resources/connector_resource.ts @@ -1,4 +1,4 @@ -import type { ConnectorProvider, Result } from "@dust-tt/types"; +import type { ConnectorProvider, ModelId, Result } from "@dust-tt/types"; import { Err, Ok } from "@dust-tt/types"; import type { Attributes, @@ -114,7 +114,7 @@ export class ConnectorResource extends BaseResource { return new this(this.model, blob.get()); } - static async fetchByIds(ids: number[]) { + static async fetchByIds(ids: ModelId[]) { const blobs = await ConnectorResource.model.findAll({ where: { id: ids, diff --git a/connectors/src/resources/storage/models/connector_model.ts b/connectors/src/resources/storage/models/connector_model.ts index d05259e038a4..0e129b357577 100644 --- a/connectors/src/resources/storage/models/connector_model.ts +++ b/connectors/src/resources/storage/models/connector_model.ts @@ -115,11 +115,6 @@ ConnectorModel.init( { sequelize: sequelizeConnection, modelName: "connectors", - indexes: [ - { fields: ["workspaceId", "dataSourceName"], unique: true }, - { - fields: ["pausedAt"], - }, - ], + indexes: [{ fields: ["workspaceId", "dataSourceName"], unique: true }], } );