From 2c23830b36016abb9121c5869988b0815dcf705a Mon Sep 17 00:00:00 2001 From: m0veax Date: Sat, 25 May 2024 22:16:24 +0200 Subject: [PATCH] modern api endpoint name --- scripts/close_aerie.sh | 2 +- scripts/open_aerie.sh | 2 +- src/main.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/close_aerie.sh b/scripts/close_aerie.sh index ec17edb..555452e 100644 --- a/scripts/close_aerie.sh +++ b/scripts/close_aerie.sh @@ -1,4 +1,4 @@ curl -XPOST \ -H "Content-Type: application/json" \ --data '{"consumer_key": "","consumer_secret":"","aerie":false }' \ - http://localhost:3000/api/update.php + http://localhost:3000/api/update diff --git a/scripts/open_aerie.sh b/scripts/open_aerie.sh index ddd8ff5..4870e29 100644 --- a/scripts/open_aerie.sh +++ b/scripts/open_aerie.sh @@ -1,4 +1,4 @@ curl -XPOST \ -H "Content-Type: application/json" \ --data '{"consumer_key": "","consumer_secret":"","aerie":true }' \ - http://localhost:3000/api/update.php + http://localhost:3000/api/update diff --git a/src/main.rs b/src/main.rs index 4fbd6f4..a301f58 100644 --- a/src/main.rs +++ b/src/main.rs @@ -18,7 +18,7 @@ const STATUS_FILE: &str = "status.json"; async fn main() { let app = Router::new() .route("/status.json", get(root)) - .route("/api/update.php", post(the_doors)); + .route("/api/update", post(the_doors)); let listener = tokio::net::TcpListener::bind("0.0.0.0:3000").await.unwrap();