Skip to content

Commit

Permalink
Fix /grapa/studytracks to filter on the awaited result not Promise
Browse files Browse the repository at this point in the history
  • Loading branch information
AleksTeresh authored Jun 12, 2024
1 parent ee90be8 commit 9e76a8d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions importer-db-api/src/routes/grapa/grapa.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ grapaRouter.get('/persons', async (req, res) => {
})

grapaRouter.get('/studytracks/:code', async (req, res) => {
const programmes = await models.Module.findAll({
const programmes = (await models.Module.findAll({
where: {
code: req.params.code
}
}).filter(p => !p.validityPeriod.endDate)
})).filter(p => !p.validityPeriod.endDate)

const [studytracks] = await sequelize.query(
`
Expand Down

0 comments on commit 9e76a8d

Please sign in to comment.