File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " hawk.api" ,
3- "version" : " 1.2.11 " ,
3+ "version" : " 1.2.12 " ,
44 "main" : " index.ts" ,
55 "license" : " BUSL-1.1" ,
66 "scripts" : {
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ const ProjectModel = require('../models/project').default;
1313const EVENTS_GROUP_HASH_INDEX_NAME = 'groupHashUnique' ;
1414const REPETITIONS_GROUP_HASH_INDEX_NAME = 'groupHash_hashed' ;
1515const REPETITIONS_USER_ID_INDEX_NAME = 'userId' ;
16+ const EVENTS_TIMESTAMP_INDEX_NAME = 'timestamp' ;
1617const MAX_SEARCH_QUERY_LENGTH = 50 ;
1718
1819/**
@@ -124,6 +125,13 @@ module.exports = {
124125 sparse : true ,
125126 } ) ;
126127
128+ await projectEventsCollection . createIndex ( {
129+ timestamp : 1 ,
130+ } , {
131+ name : EVENTS_TIMESTAMP_INDEX_NAME ,
132+ sparse : true ,
133+ } ) ;
134+
127135 telegram . sendMessage ( `🤯 Project ${ name } was created` ) ;
128136
129137 return project ;
You can’t perform that action at this time.
0 commit comments