Skip to content
Snippets Groups Projects
Commit f29b2ff1 authored by Emildeon Thevaraj's avatar Emildeon Thevaraj
Browse files

update controller

parent 6685ce05
No related branches found
No related tags found
No related merge requests found
......@@ -23,10 +23,11 @@ import java.util.Map;
import java.util.Optional;
@Controller
@RequestMapping("/tickets")
public class TicketController implements TicketsApi{
Customer customer;
@PostMapping("/tickets")
@PostMapping("")
public ResponseEntity<Ticket> buyTicket(@ApiParam(value = "TicketRequest object" ,required=true ) @Valid @RequestBody TicketRequest body) {
getRequest().ifPresent(request -> {
for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
......@@ -40,7 +41,7 @@ public class TicketController implements TicketsApi{
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
}
@PostMapping("/tickets/validate")
@PostMapping("/validate")
public ResponseEntity<Void> validateTicket(@ApiParam(value = "TicketValidationRequest object that needs to validated" ,required=true ) @Valid @RequestBody TicketValidationRequest body) {
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment