File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -879,7 +879,7 @@ class EventsFactory extends Factory {
879879 * Remove a single event and all related data (repetitions, daily events)
880880 *
881881 * @param {string|ObjectId } eventId - id of the original event to remove
882- * @return {Promise<DeleteResult > }
882+ * @return {Promise<boolean > }
883883 */
884884 async removeEvent ( eventId ) {
885885 const eventsCollection = this . getCollection ( this . TYPES . EVENTS ) ;
@@ -905,7 +905,7 @@ class EventsFactory extends Factory {
905905 await this . getCollection ( this . TYPES . DAILY_EVENTS ) . deleteMany ( { groupHash } ) ;
906906 }
907907
908- return result ;
908+ return result . acknowledged && result . deletedCount > 0 ;
909909 }
910910
911911 /**
Original file line number Diff line number Diff line change @@ -166,7 +166,7 @@ module.exports = {
166166
167167 const result = await factory . removeEvent ( eventId ) ;
168168
169- return ! ! result . acknowledged ;
169+ return result ;
170170 } ,
171171
172172 /**
You can’t perform that action at this time.
0 commit comments