From c7c021c9694d6cea6a2e6d7958cf5c7fcebf431d Mon Sep 17 00:00:00 2001 From: Ahmed Bouhuolia Date: Sun, 11 Aug 2024 12:10:15 +0200 Subject: [PATCH] fix(banking): detarmine if Plaid item is disabled (#585) --- packages/server/src/services/Banking/Plaid/PlaidWebhooks.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/server/src/services/Banking/Plaid/PlaidWebhooks.ts b/packages/server/src/services/Banking/Plaid/PlaidWebhooks.ts index 24a8c5d8d..bebf29671 100644 --- a/packages/server/src/services/Banking/Plaid/PlaidWebhooks.ts +++ b/packages/server/src/services/Banking/Plaid/PlaidWebhooks.ts @@ -83,8 +83,9 @@ export class PlaidWebooks { webhookCode: string ): Promise { const { PlaidItem } = this.tenancy.models(tenantId); + const plaidItem = await PlaidItem.query() - .findById(plaidItemId) + .findOne({ plaidItemId }) .throwIfNotFound(); switch (webhookCode) {