Skip to content

Commit

Permalink
chore: more rename
Browse files Browse the repository at this point in the history
  • Loading branch information
chris13524 committed Nov 8, 2023
1 parent 77d5906 commit c917bdb
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/handlers/push_message.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Arc<AppState>>,
headers: HeaderMap,
RequireValidSignature(Json(body)): RequireValidSignature<Json<PushMessageBody>>,
Expand All @@ -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)),
Expand All @@ -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,
Expand All @@ -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,
Expand All @@ -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();

Expand Down

0 comments on commit c917bdb

Please sign in to comment.