Done ticket GEPAFINBE-192 Fixed NDG in-progress response case and updated status code to 200.

This commit is contained in:
piyushkag
2025-03-24 19:29:43 +05:30
parent ce21dc23f6
commit 1aabc0bb81
4 changed files with 32 additions and 2 deletions

View File

@@ -43,7 +43,10 @@ public class AppointmentController implements AppointmentApi {
NdgResponse appointmentLoginResponse = appointmentService.checkNdgForAppointment(request, applicationId);
return ResponseEntity.status(HttpStatus.OK).body(new Response<>(appointmentLoginResponse, Status.SUCCESS, Translator.toLocale(GepafinConstant.NDG_FETCH_SUCCESSFULLY)));
// Determine the appropriate message
String responseMessage = (appointmentLoginResponse.getNdg() == null) ? Translator.toLocale(GepafinConstant.NDG_GENERATION_IS_IN_PROGRESS) : Translator.toLocale(GepafinConstant.NDG_FETCH_SUCCESSFULLY);
// Return response immediately with 200 OK
return ResponseEntity.status(HttpStatus.OK).body(new Response<>(appointmentLoginResponse, Status.SUCCESS, responseMessage));
}
@Override