From c252e76dd665ddd0cfa84ffdaa26fb52f0796600 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Fri, 2 Oct 2020 13:58:22 +0200 Subject: Added oisjgoiesjgoseijgf --- quotes/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'quotes/index.js') diff --git a/quotes/index.js b/quotes/index.js index c125548..ad9fa97 100644 --- a/quotes/index.js +++ b/quotes/index.js @@ -22,7 +22,7 @@ app.post("/api/add", checkUser, async (req, res) => { app.get("/api/list", checkUser, 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 ORDER BY name" + "SELECT q.id, a.name, a.middlename, a.surname, q.quote, c.name AS class FROM quotes AS q INNER JOIN users AS a ON author_id = a.id INNER JOIN class AS c ON a.class_id = c.id ORDER BY a.name" ); res.json(quotes); }); -- cgit v1.2.3