diff options
author | Marvin Borner | 2020-10-02 13:58:22 +0200 |
---|---|---|
committer | Marvin Borner | 2020-10-02 14:10:41 +0200 |
commit | c252e76dd665ddd0cfa84ffdaa26fb52f0796600 (patch) | |
tree | 772f309792c50104def6ee14127dc989ab4cd111 /quotes/index.js | |
parent | e00547732bd9c701546cacaa98a073d50caa6ec4 (diff) |
Added oisjgoiesjgoseijgf
Diffstat (limited to 'quotes/index.js')
-rw-r--r-- | quotes/index.js | 2 |
1 files changed, 1 insertions, 1 deletions
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); }); |