Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

Commit

Permalink
clear query bei passing requests
Browse files Browse the repository at this point in the history
  • Loading branch information
Evers authored and Evers committed Mar 4, 2020
1 parent b346a24 commit b59220e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/services/lessons/lessons.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,14 @@ class Lessons {
let findSections;
if (params.query.all === 'true') {
// call sections via route and not populate because of permission check and socket channels
findSections = this.app.service('lesson/:lessonId/sections').find({
const sectionParams = {
...params,
route: {
lessonId: id,
},
});
};
sectionParams.query = {};
findSections = this.app.service('lesson/:lessonId/sections').find(sectionParams);
}

const findAttachments = this.app.service('models/AttachmentModel')
Expand Down

0 comments on commit b59220e

Please sign in to comment.