From d8078570eb41ed3705000f7fc77e1429e5ae7d03 Mon Sep 17 00:00:00 2001 From: KevinMidboe Date: Fri, 9 Mar 2018 13:36:01 +0100 Subject: [PATCH] Changed the sort order when selecting all from requests. --- seasoned_api/src/plex/requestRepository.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/seasoned_api/src/plex/requestRepository.js b/seasoned_api/src/plex/requestRepository.js index baf37f2..fefa027 100644 --- a/seasoned_api/src/plex/requestRepository.js +++ b/seasoned_api/src/plex/requestRepository.js @@ -18,7 +18,7 @@ class RequestRepository { this.queries = { insertRequest: `INSERT INTO requests(id,title,year,poster_path,background_path,requested_by,ip,user_agent,type) 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 ?', updateRequestedById: 'UPDATE requests SET status = ? WHERE id is ? AND type is ?', checkIfIdRequested: 'SELECT * FROM requests WHERE id IS ? AND type IS ?',