From b3fc1d4f22dad7f2776e416f4dd60796cee6524f Mon Sep 17 00:00:00 2001 From: Nikhil Sinha Date: Wed, 15 Jan 2025 07:07:17 -0500 Subject: [PATCH] delete correlation API response change remove response text send 200 OK only --- src/cli.rs | 24 ++++++++++++++---------- src/handlers/http/correlation.rs | 4 ++-- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/src/cli.rs b/src/cli.rs index 6770c17a7..a319bb161 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -23,7 +23,8 @@ use url::Url; use crate::{ oidc::{self, OpenidConfig}, - option::{validation, Compression, Mode}, storage::{AzureBlobConfig, FSConfig, S3Config}, + option::{validation, Compression, Mode}, + storage::{AzureBlobConfig, FSConfig, S3Config}, }; #[cfg(any( @@ -43,7 +44,6 @@ use std::string::String as KafkaSslProtocol; pub const DEFAULT_USERNAME: &str = "admin"; pub const DEFAULT_PASSWORD: &str = "admin"; - #[derive(Parser)] #[command( name = "parseable", @@ -81,11 +81,11 @@ pub struct Cli { #[derive(Parser)] pub enum StorageOptions { #[command(name = "local-store")] - Local(LocalStoreArgs), - + Local(LocalStoreArgs), + #[command(name = "s3-store")] S3(S3StoreArgs), - + #[command(name = "blob-store")] Blob(BlobStoreArgs), } @@ -125,7 +125,7 @@ pub struct Options { // Server configuration #[arg( - long, + long, env = "P_ADDR", default_value = "0.0.0.0:8000", value_parser = validation::socket_addr, @@ -381,13 +381,13 @@ pub struct Options { )] pub audit_logger: Option, - #[arg(long ,env = "P_AUDIT_USERNAME", help = "Audit logger username")] + #[arg(long, env = "P_AUDIT_USERNAME", help = "Audit logger username")] pub audit_username: Option, - #[arg(long ,env = "P_AUDIT_PASSWORD", help = "Audit logger password")] + #[arg(long, env = "P_AUDIT_PASSWORD", help = "Audit logger password")] pub audit_password: Option, - #[arg(long ,env = "P_MS_CLARITY_TAG", help = "Tag for MS Clarity")] + #[arg(long, env = "P_MS_CLARITY_TAG", help = "Tag for MS Clarity")] pub ms_clarity_tag: Option, } @@ -405,7 +405,11 @@ impl Options { } pub fn openid(&self) -> Option { - match (&self.oidc_client_id, &self.oidc_client_secret, &self.oidc_issuer) { + match ( + &self.oidc_client_id, + &self.oidc_client_secret, + &self.oidc_issuer, + ) { (Some(id), Some(secret), Some(issuer)) => { let origin = if let Some(url) = self.domain_address.clone() { oidc::Origin::Production(url) diff --git a/src/handlers/http/correlation.rs b/src/handlers/http/correlation.rs index c9b7e7fa3..549783178 100644 --- a/src/handlers/http/correlation.rs +++ b/src/handlers/http/correlation.rs @@ -16,7 +16,7 @@ * */ -use actix_web::{web, HttpRequest, Responder}; +use actix_web::{web, HttpRequest, HttpResponse, Responder}; use bytes::Bytes; use itertools::Itertools; use relative_path::RelativePathBuf; @@ -151,5 +151,5 @@ pub async fn delete(req: HttpRequest) -> Result