File tree Expand file tree Collapse file tree 3 files changed +10
-14
lines changed
Expand file tree Collapse file tree 3 files changed +10
-14
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,6 @@ const Event = require('../models/event');
88const { ObjectID } = require ( 'mongodb' ) ;
99const { composeEventPayloadByRepetition } = require ( '../utils/merge' ) ;
1010
11-
1211const MAX_DB_READ_BATCH_SIZE = Number ( process . env . MAX_DB_READ_BATCH_SIZE ) ;
1312
1413/**
@@ -138,7 +137,7 @@ class EventsFactory extends Factory {
138137
139138 const cursor = this . getCollection ( this . TYPES . EVENTS )
140139 . find ( query )
141- . sort ( [ [ '_id' , - 1 ] ] )
140+ . sort ( [ [ '_id' , - 1 ] ] )
142141 . limit ( limit )
143142 . skip ( skip ) ;
144143
@@ -311,7 +310,7 @@ class EventsFactory extends Factory {
311310 ? Object . fromEntries (
312311 Object
313312 . entries ( filters )
314- . map ( ( [ mark , exists ] ) => [ `event.marks.${ mark } ` , { $exists : exists } ] )
313+ . map ( ( [ mark , exists ] ) => [ `event.marks.${ mark } ` , { $exists : exists } ] )
315314 )
316315 : { } ;
317316
@@ -605,7 +604,6 @@ class EventsFactory extends Factory {
605604 if ( repetitionId === originalEventId ) {
606605 const originalEvent = await this . eventsDataLoader . load ( originalEventId ) ;
607606
608-
609607 /**
610608 * All events have same type with originalEvent id
611609 */
@@ -626,7 +624,6 @@ class EventsFactory extends Factory {
626624
627625 const originalEvent = await this . eventsDataLoader . load ( originalEventId ) ;
628626
629-
630627 /**
631628 * If one of the ids are invalid (originalEvent or repetition not found) return null
632629 */
Original file line number Diff line number Diff line change 11const EventsFactory = require ( '../models/eventsFactory' ) ;
2- const { ObjectID } = require ( 'mongodb' ) ;
32const sendPersonalNotification = require ( '../utils/personalNotifications' ) . default ;
43
54/**
@@ -68,7 +67,7 @@ module.exports = {
6867 const project = await factories . projectsFactory . findById ( projectId ) ;
6968
7069 if ( project . workspaceId . toString ( ) === '6213b6a01e6281087467cc7a' ) {
71- return [ await factories . usersFactory . findById ( user . id ) ] ;
70+ return [ await factories . usersFactory . findById ( user . id ) ] ;
7271 }
7372
7473 if ( ! visitedBy || ! visitedBy . length ) {
Original file line number Diff line number Diff line change @@ -128,17 +128,17 @@ module.exports = {
128128 await projectEventsCollection . createIndex ( {
129129 groupHash : 1 ,
130130 } ,
131- {
132- unique : true ,
133- name : EVENTS_GROUP_HASH_INDEX_NAME ,
134- } ) ;
131+ {
132+ unique : true ,
133+ name : EVENTS_GROUP_HASH_INDEX_NAME ,
134+ } ) ;
135135
136136 await projectRepetitionsEventsCollection . createIndex ( {
137137 groupHash : 'hashed' ,
138138 } ,
139- {
140- name : REPETITIONS_GROUP_HASH_INDEX_NAME ,
141- } ) ;
139+ {
140+ name : REPETITIONS_GROUP_HASH_INDEX_NAME ,
141+ } ) ;
142142
143143 await projectRepetitionsEventsCollection . createIndex ( {
144144 'payload.user.id' : 1 ,
You can’t perform that action at this time.
0 commit comments