Updated response
This commit is contained in:
@@ -44,9 +44,12 @@ public interface ApplicationEvaluationApi {
|
||||
@ApiResponse(responseCode = "404", description = "Not Found", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, examples = {
|
||||
@ExampleObject(value = ErrorConstants.NOTFOUND_ERROR_EXAMPLE) }))
|
||||
})
|
||||
@GetMapping(value = "/application/{applicationId}", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
ResponseEntity<Response<ApplicationEvaluationResponse>> getApplicationEvaluationByApplicationId(HttpServletRequest request,
|
||||
@Parameter(required = true) @PathVariable("applicationId") Long applicationId);
|
||||
@GetMapping(value = "/application", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
ResponseEntity<Response<ApplicationEvaluationResponse>> getApplicationEvaluationByApplicationId(
|
||||
HttpServletRequest request,
|
||||
@Parameter(description = "Application ID", required = false) @RequestParam(value = "applicationId", required = false) Long applicationId,
|
||||
@Parameter(description = "Assigned Application ID", required = false) @RequestParam(value = "assignedApplicationId", required = false) Long assignedApplicationId);
|
||||
|
||||
|
||||
@Operation(summary = "API to delete ApplicationEvaluation",
|
||||
responses = {
|
||||
@@ -67,9 +70,9 @@ public interface ApplicationEvaluationApi {
|
||||
@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) })) })
|
||||
@PutMapping(value = "/{id}/status", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
@PutMapping(value = "/{applicationId}/status", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
ResponseEntity<Response<ApplicationEvaluationResponse>> updateApplicationEvaluationStatus(HttpServletRequest request,
|
||||
@Parameter( required = true) @PathVariable("id") Long id,
|
||||
@Parameter( required = true) @PathVariable("applicationId") Long applicationId,
|
||||
@Parameter(description = "status", required = true)@RequestParam(value = "status", required = true) ApplicationEvaluationStatusTypeEnum status);
|
||||
|
||||
}
|
||||
|
||||
@@ -37,9 +37,11 @@ public class ApplicationEvaluationApiController implements ApplicationEvaluation
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseEntity<Response<ApplicationEvaluationResponse>> getApplicationEvaluationByApplicationId(HttpServletRequest request,
|
||||
Long applicationId) {
|
||||
ApplicationEvaluationResponse response = applicationEvaluationService.getApplicationEvaluationByApplicationId(request,applicationId);
|
||||
public ResponseEntity<Response<ApplicationEvaluationResponse>> getApplicationEvaluationByApplicationId(
|
||||
HttpServletRequest request, Long applicationId, Long assignedApplicationId) {
|
||||
|
||||
ApplicationEvaluationResponse response = null;
|
||||
response = applicationEvaluationService.getApplicationEvaluationByApplicationId(request, applicationId,assignedApplicationId);
|
||||
return ResponseEntity.status(HttpStatus.OK)
|
||||
.body(new Response<>(response, Status.SUCCESS, Translator.toLocale(GepafinConstant.EVALUATION_FETCHED_SUCCESSFULLY)));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user