Skip to content
This repository has been archived by the owner on Oct 23, 2022. It is now read-only.

Commit

Permalink
FIX: duplicate paths
Browse files Browse the repository at this point in the history
  • Loading branch information
eigenein committed Jul 28, 2022
1 parent 531cb50 commit 76400c8
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions rusty-tractive-telegram-bot/src/bot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use poem::http::StatusCode;
use poem::listener::TcpListener;
use poem::middleware::AddData;
use poem::web::{Data, Json, TypedHeader};
use poem::{get, handler, head, post, EndpointExt, Route, Server};
use poem::{get, handler, post, EndpointExt, Route, Server};
use rusty_shared_telegram::api::BotApi;
use rusty_shared_telegram::headers::SecretToken;
use rusty_shared_telegram::methods::Method;
Expand Down Expand Up @@ -38,10 +38,8 @@ pub async fn run(

info!("running the bot…");
let app = Route::new()
.at("/", post(post_update))
.at("/", head(get_health))
.at("/health", get(get_health))
.at("/health", head(get_health))
.at("/", post(post_update).head(get_health))
.at("/health", get(get_health).head(get_health))
.with(AddData::new(api))
.with(AddData::new(SecretToken(secret_token)))
.with(TracingMiddleware);
Expand Down

0 comments on commit 76400c8

Please sign in to comment.