fix: Make the bot_username parameter to lowercase

Signed-off-by: Awiteb <a@4rs.nl>
This commit is contained in:
Awiteb 2024-05-31 18:47:10 +03:00
parent 2f4f4978ff
commit d64de3c4dc
Signed by: awiteb
GPG key ID: 3F6B55640AA6682F

View file

@ -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::<String>("bot_username")
.expect("The path param is required");
.expect("The path param is required")
.to_lowercase();
let app_state = depot
.obtain::<Arc<AppState>>()
.expect("The app state is injected");