Skip to content

Commit 607a27e

Browse files
committed
fix: remove sort from query when fetching studies to sort by publication date
1 parent 134bf25 commit 607a27e

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/api/study/controllers/study.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,10 @@ module.exports = createCoreController('api::study.study', ({ strapi }) => ({
119119
if (sort === 'publications.date') {
120120
const studies = await strapi.entityService.findMany(
121121
'api::study.study',
122-
ctx.query
122+
{
123+
...ctx.query,
124+
sort: null
125+
}
123126
);
124127

125128
studies.sort((a, b) => {

0 commit comments

Comments
 (0)