don't return 412 (#6133)
This commit is contained in:
parent
5fb32229f9
commit
2d6a1160d5
@ -147,13 +147,7 @@ impl RestApiRouter {
|
|||||||
HealthInfo { status, message, details, }
|
HealthInfo { status, message, details, }
|
||||||
};
|
};
|
||||||
|
|
||||||
let status = if [&peers.status, &sync.status, &time.status].iter().any(|x| *x != &HealthStatus::Ok) {
|
response::as_json(StatusCode::Ok, &Health { peers, sync, time })
|
||||||
StatusCode::PreconditionFailed // HTTP 412
|
|
||||||
} else {
|
|
||||||
StatusCode::Ok // HTTP 200
|
|
||||||
};
|
|
||||||
|
|
||||||
response::as_json(status, &Health { peers, sync, time })
|
|
||||||
};
|
};
|
||||||
|
|
||||||
let time = self.api.time.time_drift();
|
let time = self.api.time.time_drift();
|
||||||
|
Loading…
Reference in New Issue
Block a user