From 5a5118a7b03e8c961717f6bdbdd686a946375b28 Mon Sep 17 00:00:00 2001 From: Ajay Ramachandran Date: Sat, 20 Jul 2019 21:48:08 -0400 Subject: [PATCH] Made it order the sponsor times by start time. --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index a805fa0..f46e2f2 100644 --- a/index.js +++ b/index.js @@ -36,7 +36,7 @@ app.get('/api/getVideoSponsorTimes', function (req, res) { let votes = [] let UUIDs = []; - db.prepare("SELECT startTime, endTime, votes, UUID FROM sponsorTimes WHERE videoID = ?").all(videoID, function(err, rows) { + db.prepare("SELECT startTime, endTime, votes, UUID FROM sponsorTimes WHERE videoID = ? ORDER BY startTime").all(videoID, function(err, rows) { if (err) console.log(err); for (let i = 0; i < rows.length; i++) {