|
|
|
|
193
|
* The code snippet below enables us to update a poll.
|
193
|
* The code snippet below enables us to update a poll.
|
194
|
|
194
|
|
195
|
```java
|
195
|
```java
|
196
|
-RequestMapping(value="/polls/{pollId}", method=RequestMethod.PUT)
|
|
|
|
|
196
|
+@RequestMapping(value="/polls/{pollId}", method=RequestMethod.PUT)
|
197
|
public ResponseEntity<?> updatePoll(@RequestBody Poll poll, @PathVariable Long pollId) {
|
197
|
public ResponseEntity<?> updatePoll(@RequestBody Poll poll, @PathVariable Long pollId) {
|
198
|
// Save the entity
|
198
|
// Save the entity
|
199
|
Poll p = pollRepository.save(poll);
|
199
|
Poll p = pollRepository.save(poll);
|