Commit 7e89697e authored by Matthieu - Greep's avatar Matthieu - Greep

Add todo check player and map

parent c04ef767
......@@ -17,6 +17,10 @@ module.exports = function(app, sql, tokenCheck, errorHandler) {
if (isNaN(vote)) return errorHandler(res, 400, 'Invalid vote');
if (vote < 0 || vote > 100) return errorHandler(res, 400, 'Vote must be between 0 and 100');
//TODO: check if player exists (tmio API check)
//TODO: check if map exists (tmio API check)
sql.query('SELECT * FROM votes WHERE map = ? AND player = ?', [mapId,player], (err, sqlRes)=>{
if (err) {
console.log(err);
......
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