We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3b12eb6 commit 904966aCopy full SHA for 904966a
src/resolvers/project.js
@@ -12,6 +12,7 @@ const ProjectModel = require('../models/project').default;
12
const EVENTS_GROUP_HASH_INDEX_NAME = 'groupHashUnique';
13
const REPETITIONS_GROUP_HASH_INDEX_NAME = 'groupHash_hashed';
14
const REPETITIONS_USER_ID_INDEX_NAME = 'userId';
15
+const EVENTS_TIMESTAMP_INDEX_NAME = 'timestamp';
16
const MAX_SEARCH_QUERY_LENGTH = 50;
17
18
/**
@@ -123,6 +124,13 @@ module.exports = {
123
124
sparse: true,
125
});
126
127
+ await projectEventsCollection.createIndex({
128
+ 'timestamp': 1,
129
+ }, {
130
+ name: EVENTS_TIMESTAMP_INDEX_NAME,
131
+ sparse: true,
132
+ });
133
+
134
telegram.sendMessage(`🤯 Project ${name} was created`);
135
136
return project;
0 commit comments