@@ -31,7 +31,7 @@ export default async (data) => {
31
31
const update = [ ] ;
32
32
await Promise . all ( data . map ( async ( d ) => {
33
33
const period = parseInt ( d . period , 10 ) ;
34
- const { type, countBefore, changedIds } = d . types . find ( t => { return t . type === 'Gesetzgebung' || t . type === 'Antrag' ; } ) ;
34
+ const { type, countBefore, changedIds } = d . types . find ( t => t . type === 'Gesetzgebung' || t . type === 'Antrag' ) ;
35
35
const group = groups . find ( c => c . period === period ) ;
36
36
const localGroup = group ? group . types . find ( ct => ct . type === type ) : null ;
37
37
const localCount = localGroup ? localGroup . count : 0 ;
@@ -44,18 +44,18 @@ export default async (data) => {
44
44
query : getProcedureUpdates ,
45
45
variables : { period, type } ,
46
46
} ) ;
47
- // Find local Procedure Updates
47
+ // Find local Procedure Updates
48
48
const localProcedureUpdates = await ProcedureModel . find (
49
49
{ period, type } ,
50
50
{ procedureId : 1 , bioUpdateAt : 1 } ,
51
51
) ;
52
- // Compare
52
+ // Compare
53
53
procedureUpdates . forEach ( ( pu ) => {
54
54
const localData = localProcedureUpdates . find ( ld => ld . procedureId === pu . procedureId ) ;
55
55
if (
56
56
! localData ||
57
- ( pu . bioUpdateAt &&
58
- new Date ( localData . bioUpdateAt ) . getTime ( ) !== new Date ( pu . bioUpdateAt ) . getTime ( ) )
57
+ ( pu . bioUpdateAt &&
58
+ new Date ( localData . bioUpdateAt ) . getTime ( ) !== new Date ( pu . bioUpdateAt ) . getTime ( ) )
59
59
) {
60
60
update . push ( pu . procedureId ) ;
61
61
}
0 commit comments