aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--admin/index.js2
-rw-r--r--app.js2
2 files changed, 2 insertions, 2 deletions
diff --git a/admin/index.js b/admin/index.js
index 8d71896..8c9c0ae 100644
--- a/admin/index.js
+++ b/admin/index.js
@@ -54,7 +54,7 @@ app.get("/api/answers", checkAdmin, async (req, res) => {
res.json(answers);
});
-app.get("/api/votes", checkUser, async (req, res) => {
+app.get("/api/votes", 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",
);
diff --git a/app.js b/app.js
index 92f4c8b..6f4468d 100644
--- a/app.js
+++ b/app.js
@@ -36,7 +36,7 @@ app.use("/mottovote", checkUser, mottovote);
app.use("/quotes", checkUser, quotes);
// app.use("/poll", checkUser, poll);
// app.use("/profile", checkUser, profile);
-app.use("/admin", checkUser, admin);
+app.use("/admin", admin); // Lel
app.use("/auth", auth);
app.listen(process.env.PORT || 5005, () => console.log(`Server started on http://localhost:${process.env.PORT}`));