From c917bdb342c34843f99dda688f6a79dc13e727d3 Mon Sep 17 00:00:00 2001 From: Chris Smith Date: Wed, 8 Nov 2023 07:51:38 -0500 Subject: [PATCH] chore: more rename --- src/handlers/push_message.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/handlers/push_message.rs b/src/handlers/push_message.rs index 42a4e973..8e0f8b9c 100644 --- a/src/handlers/push_message.rs +++ b/src/handlers/push_message.rs @@ -135,7 +135,7 @@ pub async fn handler( #[instrument(name = "push_message_internal", skip_all, fields(tenant_id = tenant_id, client_id = id, id = body.id))] pub async fn handler_internal( - Path((tenant_id, id)): Path<(String, String)>, + Path((tenant_id, client_id)): Path<(String, String)>, StateExtractor(state): StateExtractor>, headers: HeaderMap, RequireValidSignature(Json(body)): RequireValidSignature>, @@ -146,7 +146,7 @@ pub async fn handler_internal( #[cfg(feature = "analytics")] let (flags, encrypted) = (body.payload.clone().flags, body.payload.is_encrypted()); - let client = match state.client_store.get_client(&tenant_id, &id).await { + let client = match state.client_store.get_client(&tenant_id, &client_id).await { Ok(c) => Ok(c), Err(StoreError::NotFound(_, _)) => Err(ClientNotFound), Err(e) => Err(Store(e)), @@ -161,7 +161,7 @@ pub async fn handler_internal( country: None, continent: None, project_id: tenant_id.clone().into(), - client_id: id.clone().into(), + client_id: client_id.clone().into(), topic: topic.clone(), push_provider: "unknown".into(), encrypted, @@ -182,7 +182,7 @@ pub async fn handler_internal( country: None, continent: None, project_id: tenant_id.clone().into(), - client_id: id.clone().into(), + client_id: client_id.clone().into(), topic, push_provider: client.push_type.as_str().into(), encrypted, @@ -199,7 +199,7 @@ pub async fn handler_internal( increment_counter!(state.metrics, received_notifications); - let client_id = id + let client_id = client_id .trim_start_matches(DECENTRALIZED_IDENTIFIER_PREFIX) .to_string();