Skip to content

Instantly share code, notes, and snippets.

@abhishek-sisodiya
Created July 30, 2019 10:18
Show Gist options
  • Save abhishek-sisodiya/2691ec01a0c70785b813fc3c92ef3304 to your computer and use it in GitHub Desktop.
Save abhishek-sisodiya/2691ec01a0c70785b813fc3c92ef3304 to your computer and use it in GitHub Desktop.
package com.org.project.theWeatherMan.controller;
/**
* This controller class handle request/response for login and register.
*
* @author abhishek.sisodiya
* @since 03/07/2019.
*/
@RestController
public class UserVotingController {
@Autowired
private VotingService votingService;
@ApiOperation(value = "User Vote for particular provider.", authorizations = {
@Authorization(value = "Authorization") })
@RequestMapping(value = "/uservote", method = RequestMethod.POST)
public ResponseEntity createAuthenticationToken(@RequestBody Map<String, Object> payload) throws Exception {
return new ResponseEntity(new CustomResponseEntity().getResponseObject(votingService.userVote(payload)),
HttpStatus.OK);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment