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

Commit

Permalink
Fix path prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
laptou committed Jan 10, 2021
1 parent 679e35e commit 7b044b1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ pub async fn webhook<'a>(bot: Bot) -> impl UpdateListener<Infallible> {
.expect("PORT value to be integer");

let endpoint = format!("bot{}", teloxide_token);
let url = format!("https://reaxnbot.dev/reaction/{}", endpoint);
let prefix = "reactions";
let url = format!("https://reaxnbot.dev/{}/{}", prefix, endpoint);

bot.set_webhook(url)
.send()
Expand All @@ -83,7 +84,7 @@ pub async fn webhook<'a>(bot: Bot) -> impl UpdateListener<Infallible> {
let (tx, rx) = tokio::sync::mpsc::unbounded_channel();

let server = warp::post()
.and(warp::path("reaction"))
.and(warp::path(prefix))
.and(warp::path(endpoint))
.and(warp::body::json())
.map(move |json: serde_json::Value| {
Expand Down

0 comments on commit 7b044b1

Please sign in to comment.