diff options
author | Lars Krönner | 2020-10-10 18:39:46 +0200 |
---|---|---|
committer | GitHub | 2020-10-10 18:39:46 +0200 |
commit | 1f45ede8253421439e07790375b72a31ceef33ed (patch) | |
tree | a9285cef4e2dc3451ed609be2a34bbf21580c35e /mottovote/index.js | |
parent | 930ecde7e84e723061cba4780459887c329e50a3 (diff) | |
parent | 16ebbb932c0b780c11d3e574bc24a515eb095f5f (diff) |
Merge branch 'master' into profile
Diffstat (limited to 'mottovote/index.js')
-rw-r--r-- | mottovote/index.js | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/mottovote/index.js b/mottovote/index.js index d0af6e3..2df985d 100644 --- a/mottovote/index.js +++ b/mottovote/index.js @@ -34,12 +34,4 @@ app.put("/api/vote", checkUser, async (req, res) => { } }); -// Vote result - admin -app.get("/api/get", checkUser, async (req, res) => { - const votes = await db.query( - "SELECT m.id, m.name, m.description, SUM(votes) votes FROM motto_votes mv RIGHT JOIN mottos m on mv.motto_id = m.id GROUP BY m.id, m.name, m.description ORDER BY SUM(votes) DESC", - ); - res.json(votes); -}); - module.exports = app; |