feat: add socker connection between client and server

This commit is contained in:
Ahmed Bouhuolia
2024-02-24 00:18:48 +02:00
parent 1fd8a53ed1
commit 2d3544fe37
16 changed files with 357 additions and 27 deletions

View File

@@ -3,6 +3,7 @@ import { PlaidApplication } from '@/services/Banking/Plaid/PlaidApplication';
import { Request, Response } from 'express';
import { Inject, Service } from 'typedi';
import BaseController from '../BaseController';
import { PlaidWebhookTenantBootMiddleware } from '@/services/Banking/Plaid/PlaidWebhookTenantBootMiddleware';
@Service()
export class Webhooks extends BaseController {
@@ -15,6 +16,7 @@ export class Webhooks extends BaseController {
router() {
const router = Router();
router.use(PlaidWebhookTenantBootMiddleware);
router.post('/plaid', this.plaidWebhooks.bind(this));
return router;
@@ -34,8 +36,6 @@ export class Webhooks extends BaseController {
item_id: plaidItemId,
} = req.body;
console.log(req.body, 'triggered');
await this.plaidApp.webhooks(
tenantId,
plaidItemId,