Skip to content

Commit

Permalink
Hotfix : discard .populate in Mailings.findForAPI
Browse files Browse the repository at this point in the history
  • Loading branch information
deelanM committed Apr 10, 2021
1 parent dba1da5 commit 956fa25
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions packages/server/mailing/mailing.schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,17 +134,8 @@ MailingSchema.methods.duplicate = function duplicate(_user) {
return this;
};

MailingSchema.statics.findForApi = async function findForApi(
query = {},
// eslint-disable-next-line no-unused-vars
sortParams = { updatedAt: -1 }
) {
const mailings = await this.find(query).populate({
path: '_company',
select: { id: 1, name: 1 },
});
// .sort(sortParams)
return mailings;
MailingSchema.statics.findForApi = async function findForApi(query = {}) {
return this.find(query);
};

// Extract used tags from creations
Expand Down

0 comments on commit 956fa25

Please sign in to comment.