Skip to content

Commit

Permalink
sort the open training sessions list
Browse files Browse the repository at this point in the history
  • Loading branch information
tomcoombs2000 committed Feb 23, 2024
1 parent 154d103 commit ce37ae6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion controllers/TrainingController.js
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,10 @@ router.get('/session/open', getUser, auth(['atm', 'datm', 'ta', 'ins', 'mtr', 'w
instructorCid: res.user.cid,
deleted: false,
submitted: false
}).populate('student', 'fname lname cid vis').populate('milestone', 'name code').lean();
}).populate('student', 'fname lname cid vis')
.populate('milestone', 'name code')
.sort( { startTime: 1 })
.lean();

res.stdRes.data = sessions;
} catch(e) {
Expand Down

0 comments on commit ce37ae6

Please sign in to comment.