cargo fmt
This commit is contained in:
@@ -269,23 +269,21 @@ pub mod endpoint {
|
||||
|
||||
(axum::http::StatusCode::OK, axum::Json(response))
|
||||
}
|
||||
Err(err) => {
|
||||
match err {
|
||||
sqlx::Error::RowNotFound => {
|
||||
response.message = String::from("Nothing to fetch");
|
||||
Err(err) => match err {
|
||||
sqlx::Error::RowNotFound => {
|
||||
response.message = String::from("Nothing to fetch");
|
||||
|
||||
(axum::http::StatusCode::NO_CONTENT, axum::Json(response))
|
||||
}
|
||||
_ => {
|
||||
(axum::http::StatusCode::NO_CONTENT, axum::Json(response))
|
||||
}
|
||||
_ => {
|
||||
eprintln!("Error: {err:?}");
|
||||
response.message = String::from("Error");
|
||||
(
|
||||
axum::http::StatusCode::INTERNAL_SERVER_ERROR,
|
||||
axum::Json(response),
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -106,14 +106,10 @@ pub async fn fetch(
|
||||
.fetch_one(pool)
|
||||
.await
|
||||
{
|
||||
Ok(row) => {
|
||||
match parse_row(&row).await {
|
||||
Ok(scheduled_message) => {
|
||||
Ok(scheduled_message)
|
||||
}
|
||||
Err(err) => Err(err)
|
||||
}
|
||||
}
|
||||
Ok(row) => match parse_row(&row).await {
|
||||
Ok(scheduled_message) => Ok(scheduled_message),
|
||||
Err(err) => Err(err),
|
||||
},
|
||||
Err(err) => Err(err),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user