Commit 1a692230 authored by Dennis Willers's avatar Dennis Willers 🏀

Check has Vote for each map

parent 584b7a61
Pipeline #428 passed with stages
in 2 minutes and 49 seconds
......@@ -65,7 +65,8 @@ function createRouter(db) {
const hasVote = function hasVote(req, res, next) {
if (isVoteRequestValid(req)) {
const userId = req.body.userId;
const sql = 'SELECT userId FROM Vote WHERE userId = \"'+ userId + '\";';
const mapId = req.body.mapId;
const sql = 'SELECT userId FROM Vote WHERE userId = \"'+ userId + '\" AND mapId = \"' + mapId + '\";';
console.log('Map Insert: ', sql);
db.query(
sql,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment