mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 20:37:15 +02:00
Add enqueued and processed datetimes
This commit is contained in:
parent
a98949ff1d
commit
acb5e624c6
16 changed files with 160 additions and 76 deletions
|
@ -1,5 +1,5 @@
|
|||
use http::StatusCode;
|
||||
use meilidb_core::{ProcessedUpdateResult, UpdateStatus};
|
||||
use meilidb_core::ProcessedUpdateResult;
|
||||
use meilidb_schema::Schema;
|
||||
use serde_json::json;
|
||||
use tide::response::IntoResponse;
|
||||
|
@ -150,16 +150,12 @@ pub async fn get_update_status(ctx: Context<Data>) -> SResult<Response> {
|
|||
.map_err(ResponseError::internal)?;
|
||||
|
||||
let response = match status {
|
||||
UpdateStatus::Unknown => {
|
||||
tide::response::json(json!({ "message": "unknown update id" }))
|
||||
.with_status(StatusCode::NOT_FOUND)
|
||||
.into_response()
|
||||
}
|
||||
status => {
|
||||
tide::response::json(status)
|
||||
.with_status(StatusCode::OK)
|
||||
.into_response()
|
||||
}
|
||||
Some(status) => tide::response::json(status)
|
||||
.with_status(StatusCode::OK)
|
||||
.into_response(),
|
||||
None => tide::response::json(json!({ "message": "unknown update id" }))
|
||||
.with_status(StatusCode::NOT_FOUND)
|
||||
.into_response(),
|
||||
};
|
||||
|
||||
Ok(response)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue