aboutsummaryrefslogtreecommitdiff
path: root/quotes/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'quotes/index.js')
-rw-r--r--quotes/index.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/quotes/index.js b/quotes/index.js
index 66aeb5e..31ea2a5 100644
--- a/quotes/index.js
+++ b/quotes/index.js
@@ -21,7 +21,7 @@ app.post("/api/add", async (req, res) => {
app.get("/api/list", async (req, res) => {
const quotes = await db.query(
- "SELECT quotes.id, name, middlename, surname, quote FROM quotes INNER JOIN users AS a ON author_id = a.id"
+ "SELECT quotes.id, name, middlename, surname, quote FROM quotes INNER JOIN users AS a ON author_id = a.id ORDER BY name"
);
res.json(quotes);
});