Done ticket GEPAFINBE-192 Fixed NDG in-progress response case and updated status code to 200.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user