Skip to content

Commit

Permalink
fix(api): add order constraint on organization share script
Browse files Browse the repository at this point in the history
  • Loading branch information
Guillaume committed Jan 30, 2025
1 parent 84a1aef commit 566a15e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion api/src/profile/scripts/sixth-grade-organization-share.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export class SixthGradeOrganizationShare extends Script {
*/
async fetchProfileRewards(limit, offset) {
const knexConnection = DomainTransaction.getConnection();
return await knexConnection('profile-rewards').select('userId', 'id').limit(limit).offset(offset);
return await knexConnection('profile-rewards').select('userId', 'id').limit(limit).offset(offset).orderBy('id');
}

async fetchUserOrganizations(userId) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ describe('Integration | Profile | Scripts | sixth-grade-organization-share ', f
databaseBuilder.factory.buildOrganizationLearner({ organizationId: firstOrganizationId, userId }),
);

// build an other organization learner for userId 3
// build another organization learner for userId 3
databaseBuilder.factory.buildOrganizationLearner({ organizationId: secondOrganizationId, userId: 3 });

// build profile rewards
Expand Down

0 comments on commit 566a15e

Please sign in to comment.