From 35fc1bedf0c2993688899af9f9cbf9da95cb7aa9 Mon Sep 17 00:00:00 2001
From: echicken <echicken@bbs.electronicchicken.com>
Date: Wed, 23 Nov 2016 01:07:16 -0500
Subject: [PATCH] Poll-posting things

---
 web/root/api/forum.ssjs | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/web/root/api/forum.ssjs b/web/root/api/forum.ssjs
index aa3357b010..063eca097f 100644
--- a/web/root/api/forum.ssjs
+++ b/web/root/api/forum.ssjs
@@ -164,9 +164,17 @@ if ((http_request.method === 'GET' || http_request.method === 'POST') &&
                 if (typeof http_request.query.subject !== 'undefined' &&
                     typeof http_request.query.sub !== 'undefined' &&
                     typeof http_request.query.votes !== 'undefined' &&
+                    typeof http_request.query.results !== 'undefined' &&
                     typeof http_request.query.answer !== 'undefined'
                 ) {
-                    reply = "barf";
+                    reply.success = postPoll(
+                        http_request.query.sub[0],
+                        http_request.query.subject[0],
+                        http_request.query.votes[0],
+                        http_request.query.results[0],
+                        http_request.query.answer,
+                        http_request.query.comment || []
+                    );
                 }
                 break;
 
-- 
GitLab