pinakes-server: update remaining route imports and handlers
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: I67206fd813d514f8903041eea0a4cd266a6a6964
This commit is contained in:
parent
2b2c1830a1
commit
eb6c0a3577
20 changed files with 169 additions and 87 deletions
|
|
@ -65,7 +65,7 @@ pub async fn health(State(state): State<AppState>) -> Json<HealthResponse> {
|
|||
Err(e) => {
|
||||
response.status = "degraded".to_string();
|
||||
DatabaseHealth {
|
||||
status: format!("error: {}", e),
|
||||
status: format!("error: {e}"),
|
||||
latency_ms: db_start.elapsed().as_millis() as u64,
|
||||
media_count: None,
|
||||
}
|
||||
|
|
@ -168,7 +168,7 @@ pub async fn health_detailed(
|
|||
let db_start = Instant::now();
|
||||
let (db_status, media_count) = match state.storage.count_media().await {
|
||||
Ok(count) => ("ok".to_string(), Some(count)),
|
||||
Err(e) => (format!("error: {}", e), None),
|
||||
Err(e) => (format!("error: {e}"), None),
|
||||
};
|
||||
let db_latency = db_start.elapsed().as_millis() as u64;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue