modern api endpoint name
This commit is contained in:
parent
9eff5c0496
commit
2c23830b36
@ -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
|
||||
|
@ -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
|
||||
|
@ -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();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user