impl webhook route
This commit is contained in:
+2
-2
@@ -4,7 +4,7 @@ use axum::routing::get;
|
||||
use crate::env;
|
||||
|
||||
pub async fn start_api(config: env::EnvConfig) -> anyhow::Result<()> {
|
||||
let app = Router::new().route("/", get(root));
|
||||
let app = Router::new().route("/webhook", get(webhook));
|
||||
let listerner = tokio::net::TcpListener::bind(format!("0.0.0.0:{}", config.http_port)).await?;
|
||||
|
||||
axum::serve(listerner, app)
|
||||
@@ -12,6 +12,6 @@ pub async fn start_api(config: env::EnvConfig) -> anyhow::Result<()> {
|
||||
.map_err(|e| anyhow::anyhow!(e))
|
||||
}
|
||||
|
||||
async fn root() -> &'static str {
|
||||
async fn webhook() -> &'static str {
|
||||
"Hello, World!"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user