Package io.meeds.poll.rest
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<PollRestEntity> createPoll(String spaceId, PollRestEntity pollRestEntity) org.springframework.http.ResponseEntity<PollRestEntity> getPollById(String pollId) org.springframework.http.ResponseEntity<io.meeds.poll.model.PollVote> Methods inherited from class javax.ws.rs.core.Application
getClasses, getSingletons
-
Constructor Details
-
PollRest
public PollRest()
-
-
Method Details
-
createPoll
@PostMapping(consumes="application/json", produces="application/json") @Secured("users") public org.springframework.http.ResponseEntity<PollRestEntity> 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 org.springframework.http.ResponseEntity<io.meeds.poll.model.PollVote> vote(@PathVariable("optionId") String optionId)
-