Skip to content

Commit b295da1

Browse files
authored
Merge pull request #594 from codex-team/feature/search-in-repetition-delta
feat: update search to use repetition.delta field
2 parents a18212c + 6d8b286 commit b295da1

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "hawk.api",
3-
"version": "1.2.24",
3+
"version": "1.2.25",
44
"main": "index.ts",
55
"license": "BUSL-1.1",
66
"scripts": {

src/models/eventsFactory.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,12 @@ class EventsFactory extends Factory {
292292
const searchFilter = search.trim().length > 0
293293
? {
294294
$or: [
295+
{
296+
'repetition.delta': {
297+
$regex: escapedSearch,
298+
$options: 'i',
299+
},
300+
},
295301
{
296302
'event.payload.title': {
297303
$regex: escapedSearch,
@@ -591,7 +597,6 @@ class EventsFactory extends Factory {
591597
/**
592598
* Returns Event repetitions
593599
*
594-
* @param {string|ObjectID} eventId - Event's id, could be repetitionId in case when we want to get repetitions portion by one repetition
595600
* @param {string|ObjectID} originalEventId - id of the original event
596601
* @param {Number} limit - count limitations
597602
* @param {Number} cursor - pointer to the next repetition

0 commit comments

Comments
 (0)