4
0
Fork 0
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:
zzzz 2024-06-14 19:29:05 +02:00
parent d63ba6aa3a
commit a8742e0d9d

View file

@ -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())),
}
}