Skip to content

Commit 30705fc

Browse files
committed
Merge branch 'day-planner-flow' of https://github.com/ctc-uci/aiss-backend into day-planner-flow
2 parents 9204d0b + ca8e25d commit 30705fc

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

‎routes/publishedSchedule.js‎

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,17 @@ publishedScheduleRouter.get('/dayId', async (req, res) => {
265265
`,
266266
[dayId],
267267
);
268-
// console.log(seasonResult[0]);
268+
269+
seasonResult[0].data.sort((a, b) => {
270+
if (a.start_time < b.start_time) {
271+
return -1;
272+
}
273+
if (a.start_time > b.start_time) {
274+
return 1;
275+
}
276+
return 0;
277+
});
278+
269279
res.status(200).json(keysToCamel(seasonResult)[0]);
270280
} catch (err) {
271281
res.status(500).send(err.message);

0 commit comments

Comments
 (0)