From d4365af8bd092f9b81e39c7f3e59d192230d1dfe Mon Sep 17 00:00:00 2001 From: Miguel Piedrafita Date: Fri, 17 Nov 2023 13:52:37 -0800 Subject: [PATCH] fix verification --- src/bot/mod.rs | 2 +- src/server/mod.rs | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/bot/mod.rs b/src/bot/mod.rs index 0310f75..d94b9f2 100644 --- a/src/bot/mod.rs +++ b/src/bot/mod.rs @@ -19,7 +19,7 @@ type HandlerResult = Result<(), HandlerError>; pub type JoinRequests = Arc>; type HandlerError = Box; -#[derive(Clone)] +#[derive(Debug, Clone)] pub struct JoinRequest { pub is_verified: bool, pub msg_id: Option, diff --git a/src/server/mod.rs b/src/server/mod.rs index 2a835b7..4a62506 100644 --- a/src/server/mod.rs +++ b/src/server/mod.rs @@ -28,7 +28,7 @@ pub async fn start(bot: Bot, config: AppConfig, bot_data: User, join_requests: J }), ) .route( - "/verify/:chat_id/:msg_id", + "/verify/:chat_id/:user_id", get(verify_page).post(verify_api), ) .layer(Extension(bot)) @@ -68,6 +68,7 @@ async fn verify_page(