mirror of
https://github.com/zzzzDev4/ias-tea-axum.git
synced 2025-04-21 07:41:21 +02:00
changed /delete-tea/:id from GET to DELETE
This commit is contained in:
parent
1dc70a87c8
commit
88e152210d
1 changed files with 2 additions and 2 deletions
|
@ -3,7 +3,7 @@
|
|||
// cargo shuttle resource list --show-secrets
|
||||
|
||||
use axum::{
|
||||
routing::{get, post},
|
||||
routing::{get, post, delete},
|
||||
Router,
|
||||
};
|
||||
use axum::http::Method;
|
||||
|
@ -47,7 +47,7 @@ async fn main(#[shuttle_shared_db::Postgres] pool: PgPool) -> shuttle_axum::Shut
|
|||
// teavail-device
|
||||
.route("/tea-by-rfid/:rfid", get(retrieve_tea_by_rfid))
|
||||
.route("/add-tea", post(add_tea))
|
||||
.route("/delete-tea/:id", get(delete_tea_by_id))
|
||||
.route("/delete-tea/:id", delete(delete_tea_by_id))
|
||||
//.route("/update-tea", post(update_tea_by_rfid)) // probably already covered by "update_tea_by_id"
|
||||
.with_state(state)
|
||||
.layer(tower_http::cors::CorsLayer::new()
|
||||
|
|
Loading…
Add table
Reference in a new issue