4
0
Fork 0
mirror of https://github.com/zzzzDev4/ias-tea-axum.git synced 2025-04-21 07:41:21 +02:00

fix: delete now deletes steepinglog entries

This commit is contained in:
zzzz 2024-07-03 13:17:09 +02:00
parent ce877372ef
commit c8e85ed420

View file

@ -106,6 +106,7 @@ pub async fn delete_tea_by_id(
) -> Result<impl IntoResponse, impl IntoResponse> { ) -> Result<impl IntoResponse, impl IntoResponse> {
match sqlx::query_as::<_, Tea>( match sqlx::query_as::<_, Tea>(
" "
DELETE FROM steepinglog WHERE tea_id = $1;
DELETE FROM tea WHERE id = $1 DELETE FROM tea WHERE id = $1
RETURNING id, tea_name, rfid_code, tea_notes, water_temp, steeping_seconds, registration_timestamp RETURNING id, tea_name, rfid_code, tea_notes, water_temp, steeping_seconds, registration_timestamp
", ",