aboutsummaryrefslogtreecommitdiff
path: root/mottovote/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'mottovote/index.js')
-rw-r--r--mottovote/index.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/mottovote/index.js b/mottovote/index.js
index 2df985d..eb553e8 100644
--- a/mottovote/index.js
+++ b/mottovote/index.js
@@ -6,7 +6,7 @@ const app = express.Router();
app.use("/", checkUser, express.static(__dirname + "/public/"));
app.get("/api/list", checkUser, async (req, res) => {
- const mottos = await db.query("SELECT id, name, description FROM mottos");
+ const mottos = await db.query("SELECT id, name, description FROM mottos ORDER BY name, description");
const votes = await db.query("SELECT motto_id, votes FROM motto_votes WHERE user_id = ?", [req.session.uid]);
for (const vote of votes) {