1. Juan Carlos Picado Herrera
  2. encuestame

Commits

Juan Carlos Picado Herrera  committed bd33fc2

Hashtags and scheduled not should be required

  • Participants
  • Parent commits d2fdb40
  • Branches master

Comments (0)

Files changed (1)

File encuestame-mvc/src/main/java/org/encuestame/mvc/controller/json/survey/TweetPollJsonController.java

View file
  • Ignore whitespace
         return returnData();
     }
 
+    /**
+     * Publish tweet on social accout.
+     * @param twitterAccountsId
+     * @param question
+     * @param scheduled
+     * @param hashtags
+     * @param answers
+     * @param request
+     * @param response
+     * @return
+     * @throws JsonGenerationException
+     * @throws JsonMappingException
+     * @throws IOException
+     */
     @PreAuthorize("hasRole('ENCUESTAME_USER')")
     @RequestMapping(value = "/api/survey/tweetpoll/publish.json", method = RequestMethod.GET)
     public ModelMap get(
             @RequestParam(value = "twitterAccounts", required = true) Long[] twitterAccountsId,
             @RequestParam(value = "question", required = true) String question,
-            @RequestParam(value = "scheduled", required = true) Boolean scheduled,
-            @RequestParam(value = "hashtags", required = true) String[] hashtags,
+            @RequestParam(value = "scheduled", required = false) Boolean scheduled,
+            @RequestParam(value = "hashtags", required = false) String[] hashtags,
             @RequestParam(value = "answers", required = true) String[] answers,
             HttpServletRequest request, HttpServletResponse response)
             throws JsonGenerationException, JsonMappingException, IOException {