Class PollRest

java.lang.Object
javax.ws.rs.core.Application
io.meeds.poll.rest.PollRest

@RestController @RequestMapping("/polls") public class PollRest extends javax.ws.rs.core.Application
  • Constructor Details

    • PollRest

      public PollRest()
  • Method Details

    • createPoll

      @PostMapping(consumes="application/json", produces="application/json") @Secured("users") public javax.ws.rs.core.Response createPoll(@RequestParam("spaceId") String spaceId, @RequestBody PollRestEntity pollRestEntity)
    • getPollById

      @GetMapping(path="{id}", produces="application/json") @Secured("users") public org.springframework.http.ResponseEntity<PollRestEntity> getPollById(@PathVariable("id") String pollId)
    • vote

      @PostMapping(path="/vote/{optionId}", consumes="application/json", produces="application/json") @Secured("users") public javax.ws.rs.core.Response vote(@PathVariable("optionId") String optionId)