From 531fd0305b79fed54d4388ced43da1b22a66b40f Mon Sep 17 00:00:00 2001 From: Pierre Date: Wed, 17 Jan 2018 06:55:26 +0100 Subject: [PATCH] Updated vocabulary --- assets/js/components/posts/interface.js | 6 +++--- assets/js/components/posts/ui.js | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/assets/js/components/posts/interface.js b/assets/js/components/posts/interface.js index a3a2b1a8..8da17cb7 100644 --- a/assets/js/components/posts/interface.js +++ b/assets/js/components/posts/interface.js @@ -131,16 +131,16 @@ ComunicWeb.components.posts.interface = { * Send a response to a survey * * @param {int} postID The ID of the target post - * @param {int} reponseID The ID of the selected response + * @param {int} choiceID The ID of the selected choice * @param {function} callback This function is called when we got a response */ - survey_send_response: function(postID, responseID, callback){ + survey_send_response: function(postID, choiceID, callback){ //Prepare an API request apiURI = "surveys/send_response"; params = { postID: postID, - responseID: responseID + choiceID: choiceID }; //Perform the request diff --git a/assets/js/components/posts/ui.js b/assets/js/components/posts/ui.js index 8d8d10b6..29c8dc77 100644 --- a/assets/js/components/posts/ui.js +++ b/assets/js/components/posts/ui.js @@ -676,13 +676,13 @@ ComunicWeb.components.posts.ui = { chooseButton.onclick = function(){ //Get selected answer ID - var response_id = surveyResponseChooser.value; + var choice_id = surveyResponseChooser.value; //Lock send button chooseButton.disabled = true; //Perform a request on the server - ComunicWeb.components.posts.interface.survey_send_response(infos.ID, response_id, function(response){ + ComunicWeb.components.posts.interface.survey_send_response(infos.ID, choice_id, function(response){ //Unlock button chooseButton.disabled = false;