From e52bcb760f36b68495692ac5c5a5b68e8dafc33b Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Fri, 2 Oct 2020 21:12:23 +0200 Subject: Added polls --- 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 ad9fa97..c0014c6 100644 --- a/quotes/index.js +++ b/quotes/index.js @@ -9,7 +9,7 @@ app.post("/api/add", checkUser, async (req, res) => { if (!req.body.author || !req.body.quote) return res.send("error"); try { await db.query("INSERT INTO quotes (user_id, author_id, quote) VALUE (?,?,?)", [ - req.session.uid, // TODO: Add actual user identification + req.session.uid, parseInt(req.body.author), req.body.quote, ]); -- cgit v1.2.3