Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, libarchive.org for more info) to build successfully.

Commit 648ee189 authored by echicken's avatar echicken 🐔

Added handler for 'vote' API call

parent d7ca4122
......@@ -125,6 +125,22 @@ if ((http_request.method === 'GET' || http_request.method === 'POST') &&
reply.success = false;
}
break;
case 'vote':
if (typeof http_request.query.sub !== 'undefined' &&
typeof http_request.query.id !== 'undefined' &&
typeof http_request.query.up !== 'undefined' &&
!(user.security.restrictions&UFLAG_V)
) {
reply.success = voteMessage(
http_request.query.sub[0],
http_request.query.id[0],
http_request.query.up[0]
);
} else {
reply.success = false;
}
break;
default:
break;
......
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