0 in stats when no files
All checks were successful
build docker container automatically / build (push) Successful in 3m29s
All checks were successful
build docker container automatically / build (push) Successful in 3m29s
This commit is contained in:
@ -35,6 +35,7 @@ async fn get_upload_stats() -> Result<UploadServerStats, HttpError> {
|
|||||||
.first::<(Option<BigDecimal>, i64)>(&mut pool.get().unwrap())) {
|
.first::<(Option<BigDecimal>, i64)>(&mut pool.get().unwrap())) {
|
||||||
|
|
||||||
Ok((Some(val1),val2)) => (val1, val2),
|
Ok((Some(val1),val2)) => (val1, val2),
|
||||||
|
Ok((None, val2)) => (0.into(), val2),
|
||||||
_ => return HttpError::internal_server_error("wth ?")
|
_ => return HttpError::internal_server_error("wth ?")
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user