Skip to content

Commit

Permalink
Merge pull request #799 from Badsender-com/staging
Browse files Browse the repository at this point in the history
Release production (add index _parentFolder on mailings and folders)
  • Loading branch information
FlorianGille committed May 15, 2024
2 parents d3cc15b + 491235e commit 2d26812
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/server/folder/folder.schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,6 @@ FolderSchema.virtual('childFolders', {
justOne: false,
});

FolderSchema.index({ _parentFolder: 1 });

module.exports = FolderSchema;
1 change: 1 addition & 0 deletions packages/server/mailing/mailing.schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ MailingSchema.index({ _company: 1, tags: 1 });
MailingSchema.index({ _company: 1, _parentFolder: 1, updatedAt: -1 });
MailingSchema.index({ _company: 1, _workspace: 1, updatedAt: -1 });
MailingSchema.index({ _user: 1 });
MailingSchema.index({ _parentFolder: 1 });

MailingSchema.statics.findForApi = async function findForApi(query = {}) {
return this.find(query, { previewHtml: 0, data: 0 });
Expand Down

0 comments on commit 2d26812

Please sign in to comment.