aboutsummaryrefslogtreecommitdiff
path: root/profile/index.js
diff options
context:
space:
mode:
authorLarsVomMars2021-01-29 11:31:24 +0100
committerLarsVomMars2021-01-29 11:31:24 +0100
commit5eb14d6d09638c9ba3f034a019a8cd54c512b238 (patch)
tree5031371019c62054aabccc79ccc24561d85c9998 /profile/index.js
parentdcf2ba4afc2eec720d6ae6df4be1b290cc91563c (diff)
Some fixes
Diffstat (limited to 'profile/index.js')
-rw-r--r--profile/index.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/profile/index.js b/profile/index.js
index 41de0d5..cc0972a 100644
--- a/profile/index.js
+++ b/profile/index.js
@@ -47,11 +47,11 @@ app.put("/api/answer", async (req, res) => {
async function answer(req, res, qs) {
try {
- for (const qid of req.body) {
- if (!req.body.hasOwnProperty(qid)/* || !req.body[qid]*/) continue;
+ for (const qid in req.body) {
+ if (!req.body.hasOwnProperty(qid)) continue;
const answer = req.body[qid];
try {
- await db.query(qs, [answer, qid, req.session.uid]); // TODO: Frontend display sanitize
+ await db.query(qs, [answer, qid, req.session.uid]);
} catch (e) {
console.error(e);
}