@@ -85,7 +85,8 @@ app.post('/webhooks/bundestagio/update', async (req, res) => {
85
85
await Promise . all ( data . map ( async ( d ) => {
86
86
const period = parseInt ( d . period , 10 ) ;
87
87
const { type, countBefore, changedIds } = d . types . find ( t => t . type === 'Gesetzgebung' ) ;
88
- const localCount = groups . find ( c => c . period === period ) . types . find ( ct => ct . type === type ) . count ;
88
+ const localCount = groups . find ( c => c . period === period ) . types
89
+ . find ( ct => ct . type === type ) . count ;
89
90
// Append Changed IDs
90
91
update . concat ( changedIds ) ;
91
92
// Compare Counts Remote & Local
@@ -96,7 +97,8 @@ app.post('/webhooks/bundestagio/update', async (req, res) => {
96
97
variables : { pageSize : 20 , period, type } ,
97
98
} ) ;
98
99
// Find local Procedure Updates
99
- const localProcedureUpdates = await Procedure . find ( { period, type } , { procedureId : 1 , lastUpdateDate : 1 } ) ;
100
+ const localProcedureUpdates = await Procedure
101
+ . find ( { period, type } , { procedureId : 1 , lastUpdateDate : 1 } ) ;
100
102
// Compare
101
103
procedureUpdates . map ( ( pu ) => {
102
104
const localData = localProcedureUpdates . find ( ld => ld . procedureId === pu . procedureId ) ;
0 commit comments