We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3529d73 commit 077115dCopy full SHA for 077115d
1 file changed
workers/notifier/src/index.ts
@@ -193,9 +193,12 @@ export default class NotifierWorker extends Worker {
193
*/
194
private async getProjectNotificationRules(projectId: string): Promise<Rule[]> {
195
const connection = this.accountsDb.getConnection();
196
- const projects = connection.collection('projects');
+ const projects = connection.collection<{ notifications?: Rule[] }>('projects');
197
198
- const project = await projects.findOne({ _id: new ObjectID(projectId) });
+ const project = await projects.findOne(
199
+ { _id: new ObjectID(projectId) },
200
+ { projection: { notifications: 1 } }
201
+ );
202
203
if (!project) {
204
throw new Error('There is no project with given id');
0 commit comments