mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 05:40:31 +00:00
feat: add socker connection between client and server
This commit is contained in:
@@ -25,11 +25,15 @@ export class PlaidFetchTransactionsJob {
|
||||
const plaidFetchTransactionsService = Container.get(
|
||||
PlaidUpdateTransactions
|
||||
);
|
||||
const io = Container.get('socket');
|
||||
|
||||
try {
|
||||
await plaidFetchTransactionsService.updateTransactions(
|
||||
tenantId,
|
||||
plaidItemId
|
||||
);
|
||||
// Notify the frontend to reflect the new transactions changes.
|
||||
io.emit('NEW_TRANSACTIONS_DATA', { plaidItemId });
|
||||
done();
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
|
||||
Reference in New Issue
Block a user