don't return 412 (#6133)

This commit is contained in:
Nikolay Volf 2017-07-24 18:26:49 +03:00 committed by Gav Wood
parent 5fb32229f9
commit 2d6a1160d5
1 changed files with 1 additions and 7 deletions

View File

@ -147,13 +147,7 @@ impl RestApiRouter {
HealthInfo { status, message, details, }
};
let status = if [&peers.status, &sync.status, &time.status].iter().any(|x| *x != &HealthStatus::Ok) {
StatusCode::PreconditionFailed // HTTP 412
} else {
StatusCode::Ok // HTTP 200
};
response::as_json(status, &Health { peers, sync, time })
response::as_json(StatusCode::Ok, &Health { peers, sync, time })
};
let time = self.api.time.time_drift();