Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save abhishek-sisodiya/8c9daab4d98ad84899881a0239dc77e2 to your computer and use it in GitHub Desktop.
Save abhishek-sisodiya/8c9daab4d98ad84899881a0239dc77e2 to your computer and use it in GitHub Desktop.
package com.org.project.theWeatherMan.controller;
/**
* This controller class handle request/response for average of all providers.
*
* @author abhishek.sisodiya
* @since 03/07/2019.
*/
@RestController
public class AverageProviderController {
@Autowired
private AverageProviderService averageProviderService;
@ApiOperation(value = "Average of all the providers.")
@RequestMapping(value = "/averageprovider", method = RequestMethod.GET)
public ResponseEntity getAverageOfProviders(@RequestParam String latLong)
throws Exception {
return new ResponseEntity(
new CustomResponseEntity().getResponseObject(averageProviderService.averageProvider(latLong)),
HttpStatus.OK);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment