Skip to content

Commit

Permalink
fix path handling
Browse files Browse the repository at this point in the history
  • Loading branch information
m1guelpf committed Nov 15, 2023
1 parent 480921d commit f290130
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/server/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,8 @@ pub async fn start(bot: Bot, config: AppConfig, bot_data: User, join_requests: J
}

async fn verify_page(
Path(chat_id): Path<ChatId>,
Path(msg_id): Path<MessageId>,
Extension(config): Extension<AppConfig>,
Path((chat_id, msg_id)): Path<(ChatId, MessageId)>,
Extension(join_reqs): Extension<JoinRequests>,
) -> Result<Html<String>, StatusCode> {
if !join_reqs.contains_key(&(chat_id, msg_id)) {
Expand Down Expand Up @@ -102,9 +101,8 @@ struct VerifyRequest {

async fn verify_api(
Extension(bot): Extension<Bot>,
Path(chat_id): Path<ChatId>,
Path(msg_id): Path<MessageId>,
Extension(config): Extension<AppConfig>,
Path((chat_id, msg_id)): Path<(ChatId, MessageId)>,
Extension(join_reqs): Extension<JoinRequests>,
Json(req): Json<VerifyRequest>,
) -> Result<&'static str, StatusCode> {
Expand Down

0 comments on commit f290130

Please sign in to comment.