mirror of
https://github.com/zzzzDev4/ias-tea-axum.git
synced 2025-04-21 07:41:21 +02:00
small bugfix
This commit is contained in:
parent
d63ba6aa3a
commit
a8742e0d9d
1 changed files with 1 additions and 17 deletions
|
@ -115,23 +115,7 @@ pub async fn add_tea(
|
|||
.fetch_one(&state.pool)
|
||||
.await
|
||||
{
|
||||
Ok(tea) => {
|
||||
// add steeping time change to steeping log
|
||||
match sqlx::query(
|
||||
"
|
||||
INSERT INTO steepinglog (tea_id, steeping_seconds)
|
||||
VALUES ($1, $2)
|
||||
",
|
||||
)
|
||||
.bind(tea.id)
|
||||
.bind(tea.steeping_seconds)
|
||||
.execute(&state.pool)
|
||||
.await
|
||||
{
|
||||
Ok(_) => Ok((StatusCode::OK, Json(tea))),
|
||||
Err(e) => Err((StatusCode::BAD_REQUEST, e.to_string())),
|
||||
}
|
||||
}
|
||||
Ok(tea) => Ok((StatusCode::OK, Json(tea))),
|
||||
Err(e) => Err((StatusCode::BAD_REQUEST, e.to_string())),
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue