Skip to content

Commit

Permalink
refactor(events): update api events to follow snake case naming (#2828)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
lsampras and github-actions[bot] authored Nov 10, 2023
1 parent f847802 commit b3d5062
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion crates/common_utils/src/events.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ pub trait ApiEventMetric {
}

#[derive(Clone, Debug, Eq, PartialEq, Serialize)]
#[serde(tag = "flow_type")]
#[serde(tag = "flow_type", rename_all = "snake_case")]
pub enum ApiEventsType {
Payout,
Payment {
Expand Down
1 change: 1 addition & 0 deletions crates/router/src/events/api_logs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ use crate::{
};

#[derive(Clone, Debug, Eq, PartialEq, Serialize)]
#[serde(rename_all = "snake_case")]
pub struct ApiEvent {
api_flow: String,
created_at_timestamp: i128,
Expand Down
6 changes: 5 additions & 1 deletion crates/router/src/services/authentication.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@ pub struct AuthenticationData {
}

#[derive(Clone, Debug, Eq, PartialEq, Serialize)]
#[serde(tag = "api_auth_type")]
#[serde(
tag = "api_auth_type",
content = "authentication_data",
rename_all = "snake_case"
)]
pub enum AuthenticationType {
ApiKey {
merchant_id: String,
Expand Down

0 comments on commit b3d5062

Please sign in to comment.