From d64de3c4dcdc06b9145d452b1f7825172a393b99 Mon Sep 17 00:00:00 2001 From: Awiteb Date: Fri, 31 May 2024 18:47:10 +0300 Subject: [PATCH] fix: Make the `bot_username` parameter to lowercase Signed-off-by: Awiteb --- src/api.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/api.rs b/src/api.rs index 768eb54..a70f373 100644 --- a/src/api.rs +++ b/src/api.rs @@ -86,7 +86,8 @@ fn write_json_body(res: &mut Response, json_body: impl serde::Serialize) { async fn ping(req: &Request, res: &mut Response, depot: &mut Depot) { let bot_username = req .param::("bot_username") - .expect("The path param is required"); + .expect("The path param is required") + .to_lowercase(); let app_state = depot .obtain::>() .expect("The app state is injected");