Made it order the sponsor times by start time.

This commit is contained in:
Ajay Ramachandran
2019-07-20 21:48:08 -04:00
parent 5e3c8a3b15
commit 5a5118a7b0

View File

@@ -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++) {