Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #14 from JMKassman/sort-get-open-tickets
get open tickets is now sorted by time
  • Loading branch information
JMKassman committed Apr 13, 2019
2 parents fdac725 + 97d130c commit ec1aead
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Expand Up @@ -174,7 +174,7 @@ app.get('/api/get-open-tickets', (req, res) => {
res.sendStatus(403);
return;
}
connection.query("SELECT tickets.id, users.name, users.email, tickets.submit_time, tickets.location, tickets.tags, tickets.message FROM tickets INNER JOIN users ON tickets.hacker_id=users.id WHERE tickets.status = 'Open'",
connection.query("SELECT tickets.id, users.name, users.email, tickets.submit_time, tickets.location, tickets.tags, tickets.message FROM tickets INNER JOIN users ON tickets.hacker_id=users.id WHERE tickets.status = 'Open' ORDER BY tickets.submit_time ASC",
(err, rows) => {
if (err) {
res.sendStatus(500);
Expand Down

0 comments on commit ec1aead

Please sign in to comment.