Skip to content

Commit

Permalink
[INJIVER-587] - code cleanup
Browse files Browse the repository at this point in the history
Signed-off-by: Sreenadh S <[email protected]>
  • Loading branch information
sree96 committed Nov 27, 2024
1 parent cb37479 commit 6d2841a
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,11 @@ public class VpRequestController {

@PostMapping(consumes = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<AuthorizationRequestCreateResponseDto> createVpRequest(@Valid @RequestBody AuthorizationRequestCreateDto vpRequestCreate) {
if (vpRequestCreate.getPresentationDefinition() == null && vpRequestCreate.getVerificationType() == null)
if (vpRequestCreate.getPresentationDefinition() == null) {
return ResponseEntity.status(HttpStatus.BAD_REQUEST).body(null);
if (vpRequestCreate.getPresentationDefinition() != null) {
AuthorizationRequestCreateResponseDto authorizationRequestResponse = verifiablePresentationRequestService.createAuthorizationRequest(vpRequestCreate);
return new ResponseEntity<>(authorizationRequestResponse, HttpStatus.OK);
}
return new ResponseEntity<>(null, HttpStatus.NO_CONTENT);
AuthorizationRequestCreateResponseDto authorizationRequestResponse = verifiablePresentationRequestService.createAuthorizationRequest(vpRequestCreate);
return new ResponseEntity<>(authorizationRequestResponse, HttpStatus.CREATED);
}

@GetMapping(path = "/{requestId}/status")
Expand Down

0 comments on commit 6d2841a

Please sign in to comment.