Compare commits

..

No commits in common. "a9a123cbf3a7083e7af372ae05eb71d02996b392" and "d1455fc1cf3cf441743e029befe34fdda7e23b57" have entirely different histories.

View File

@ -5982,28 +5982,4 @@ public class SdmController extends LocaleController<AkunVO> {
}
}
@RequestMapping(value = "cek-health", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<Map<String, Object>> cekHealth(HttpServletRequest request) {
long startTime = System.currentTimeMillis();
Map<String, Object> body = new HashMap<>();
String now = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
body.put("message", "ready");
body.put("time", now);
long latency = System.currentTimeMillis() - startTime;
Map<String, Object> response = new LinkedHashMap<>();
response.put("url", request.getRequestURL().toString());
response.put("status_code", HttpStatus.OK.value());
response.put("is_ok", true);
response.put("latency_ms", latency);
response.put("body", body);
response.put("checked_at", now);
return ResponseEntity.ok(response);
}
}