porting/src/main/java/com/stackroute/pie/controller/PortingRequestController.java
//Method to update the request details
Method to update the request details
Method to update the request details
@PutMapping("request")
    public ResponseEntity updateRequest (@RequestBody PortingRequest request){
        ResponseEntity responseEntity;
        try {
            PortingRequest request1 = requestService.updateRequest(request);
            responseEntity =  new ResponseEntity<PortingRequest>(request1, HttpStatus.OK);
        }
        catch (RequestNotFoundException ex) {
            responseEntity = new ResponseEntity<String>(ex.getMessage(),HttpStatus.CONFLICT);
            ex.printStackTrace();
        }
        return responseEntity;
    }
@ PutMapping ( "request" ) public ResponseEntity updateRequest ( @ RequestBody PortingRequest request ) { ResponseEntity responseEntity ; try { PortingRequest request1 = requestService . updateRequest ( request ) ; responseEntity = new ResponseEntity < PortingRequest > ( request1 , HttpStatus . OK ) ; } catch ( RequestNotFoundException ex ) { responseEntity = new ResponseEntity < String > ( ex . getMessage ( ) , HttpStatus . CONFLICT ) ; ex . printStackTrace ( ) ; } return responseEntity ; }
Method to update the request details
Method to update the request details