Added few validation in call api

This commit is contained in:
harish
2024-09-13 15:22:43 +05:30
parent 93c9662656
commit 7e2a22c817
12 changed files with 120 additions and 58 deletions

View File

@@ -100,7 +100,7 @@ public interface CallApi {
@ExampleObject(value = ErrorConstants.BADREQUEST_ERROR_EXAMPLE) })) })
@GetMapping(value = "",
produces = { "application/json" })
ResponseEntity<Response<List<CallDetailsResponseBean>>> getAllCalls();
ResponseEntity<Response<List<CallDetailsResponseBean>>> getAllCalls(HttpServletRequest request);
@Operation(summary = "Api to validate call",

View File

@@ -65,8 +65,8 @@ public class CallApiController implements CallApi {
@Override
@Transactional(readOnly = true)
public ResponseEntity<Response<List<CallDetailsResponseBean>>> getAllCalls() {
List<CallDetailsResponseBean> calls = callService.getAllCalls();
public ResponseEntity<Response<List<CallDetailsResponseBean>>> getAllCalls(HttpServletRequest request) {
List<CallDetailsResponseBean> calls = callService.getAllCalls(request);
return ResponseEntity.status(HttpStatus.OK)
.body(new Response<>(calls, Status.SUCCESS, Translator.toLocale(GepafinConstant.CALL_FETCH_SUCCESS_MSG)));