Changed the sort order when selecting all from requests.

This commit is contained in:
2018-03-09 13:36:01 +01:00
parent 47b499c072
commit d8078570eb

View File

@@ -18,7 +18,7 @@ class RequestRepository {
this.queries = { this.queries = {
insertRequest: `INSERT INTO requests(id,title,year,poster_path,background_path,requested_by,ip,user_agent,type) insertRequest: `INSERT INTO requests(id,title,year,poster_path,background_path,requested_by,ip,user_agent,type)
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)`, VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)`,
fetchRequestedItems: 'SELECT * FROM requests ORDER BY date ASC', fetchRequestedItems: 'SELECT * FROM requests ORDER BY date DESC',
fetchRequestedItemsByStatus: 'SELECT * FROM requests WHERE status IS ? AND type LIKE ?', fetchRequestedItemsByStatus: 'SELECT * FROM requests WHERE status IS ? AND type LIKE ?',
updateRequestedById: 'UPDATE requests SET status = ? WHERE id is ? AND type is ?', updateRequestedById: 'UPDATE requests SET status = ? WHERE id is ? AND type is ?',
checkIfIdRequested: 'SELECT * FROM requests WHERE id IS ? AND type IS ?', checkIfIdRequested: 'SELECT * FROM requests WHERE id IS ? AND type IS ?',