File tree 1 file changed +10
-10
lines changed
src/main/java/com/intuit/developer/sampleapp/webhooks/service/queue
1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -61,19 +61,19 @@ public Object call() throws Exception {
61
61
62
62
//Convert payload to obj
63
63
WebhooksEvent event = service .getWebhooksEvent (payload );
64
- EventNotification eventNotification = event .getEventNotifications (). get ( 0 );
64
+ for ( EventNotification eventNotification : event .getEventNotifications ()) {
65
65
66
- // get the company config
67
- CompanyConfig companyConfig = companyConfigService .getCompanyConfigByRealmId (eventNotification .getRealmId ());
66
+ // get the company config
67
+ CompanyConfig companyConfig = companyConfigService .getCompanyConfigByRealmId (eventNotification .getRealmId ());
68
68
69
- // perform cdc with last updated timestamp and subscribed entities
70
- String cdcTimestamp = DateUtils .getStringFromDateTime (DateUtils .getCurrentDateTime ());
71
- cdcService .callDataService (companyConfig );
72
-
73
- // update cdcTimestamp in companyconfig
74
- companyConfig .setLastCdcTimestamp (cdcTimestamp );
75
- companyConfigService .save (companyConfig );
69
+ // perform cdc with last updated timestamp and subscribed entities
70
+ String cdcTimestamp = DateUtils .getStringFromDateTime (DateUtils .getCurrentDateTime ());
71
+ cdcService .callDataService (companyConfig );
76
72
73
+ // update cdcTimestamp in companyconfig
74
+ companyConfig .setLastCdcTimestamp (cdcTimestamp );
75
+ companyConfigService .save (companyConfig );
76
+ }
77
77
}
78
78
79
79
return null ;
You can’t perform that action at this time.
0 commit comments