Package se.bth.pulse.controller
Class ReportRestController
java.lang.Object
se.bth.pulse.controller.ReportRestController
This class is a rest controller that serves the report page.
-
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity
submitReport
(se.bth.pulse.controller.ReportRestController.Payload payload) This method is used to submit a report.
-
Method Details
-
submitReport
@PostMapping("/api/public/report/") public org.springframework.http.ResponseEntity submitReport(@RequestBody se.bth.pulse.controller.ReportRestController.Payload payload) This method is used to submit a report. The report is retrieved from the report repository using the id. The report content is updated and the status is set to submitted. The report saves to the report repository.- Parameters:
payload
- - the payload containing the report id and content- Returns:
- ResponseEntity - the response entity containing a success message if the report
-