modern api endpoint name

This commit is contained in:
m0veax 2024-05-25 22:16:24 +02:00
parent 9eff5c0496
commit 2c23830b36
3 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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

View File

@ -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();