updated Code
This commit is contained in:
@@ -100,4 +100,17 @@ public interface ApplicationAmendmentRequestApi {
|
||||
@Parameter(description = "The Application Amendment id", required = true) @PathVariable("id") Long id,
|
||||
@Parameter(description = "Assigned Application request object", required = true) @Valid @RequestBody ApplicationAmendmentRequestBean applicationAmendmentRequestBean);
|
||||
|
||||
@Operation(summary = "Api to get all applications amendment request by beneficary user Id",
|
||||
responses = {
|
||||
@ApiResponse(responseCode = "200", description = "OK"),
|
||||
@ApiResponse(responseCode = "404", description = "Not Found", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, examples = {
|
||||
@ExampleObject(value = ErrorConstants.NOTFOUND_ERROR_EXAMPLE) })),
|
||||
@ApiResponse(responseCode = "401", description = "Unauthorized", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, examples = {
|
||||
@ExampleObject(value = ErrorConstants.UNAUTHORIZED_ERROR_EXAMPLE) })),
|
||||
@ApiResponse(responseCode = "400", description = "Bad Request", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, examples = {
|
||||
@ExampleObject(value = ErrorConstants.BADREQUEST_ERROR_EXAMPLE) })) })
|
||||
@GetMapping(value = "/beneficiary/{id}", produces = "application/json")
|
||||
ResponseEntity<Response<List<ApplicationAmendmentRequestResponse>>> getAllAmendmentRequestByBeneficiaryId(HttpServletRequest request,
|
||||
@Parameter(description = "Id", required = false) @PathVariable(value = "id",required = false) Long beneficiaryId);
|
||||
|
||||
}
|
||||
|
||||
@@ -71,4 +71,12 @@ public class ApplicationAmendmentRequestController implements ApplicationAmendme
|
||||
return ResponseEntity.status(HttpStatus.CREATED)
|
||||
.body(new Response<>(updateApplicationAmendment, Status.SUCCESS, Translator.toLocale(GepafinConstant.APPLICATION_AMENDMENT_UPDATE_SUCCESSFULLY_MSG)));
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseEntity<Response<List<ApplicationAmendmentRequestResponse>>> getAllAmendmentRequestByBeneficiaryId(HttpServletRequest request, Long beneficiaryId) {
|
||||
log.info("Get All Application Amendment Request By Beneficiary ID");
|
||||
List<ApplicationAmendmentRequestResponse> applicationAmendmentRequestResponseList = applicationAmendmentRequestService.getAllAmendmentRequestByBeneficiaryId(request, beneficiaryId);
|
||||
return ResponseEntity.status(HttpStatus.CREATED)
|
||||
.body(new Response<>(applicationAmendmentRequestResponseList, Status.SUCCESS, Translator.toLocale(GepafinConstant.GET_APPLICATION_AMENDMENT_SUCCESS_MSG)));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user