diff --git a/src/main.rs b/src/main.rs index d862c2b..23ef56b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,4 +1,4 @@ -use axum::{Router, response::IntoResponse, routing::get}; +use axum::{Router, response::IntoResponse, routing::{get, post}}; use reqwest::StatusCode; use serde_json::json; use std::env; @@ -6,8 +6,8 @@ use std::env; // Define an asynchronous main function with the tokio runtime macro #[tokio::main] async fn main() { - // Build our application with one route: a GET request to "/" - let app = Router::new().route("/", get(trigger_runner)); + // Build our application with one route: a POST request to "/" + let app = Router::new().route("/", post(trigger_runner)); let listener = tokio::net::TcpListener::bind("0.0.0.0:3000").await.unwrap(); axum::serve(listener, app).await.unwrap();