Skip to content

Commit fadb1f1

Browse files
fix: delete correlation API response change (#1102)
remove response text send 200 OK only
1 parent 2f92ac2 commit fadb1f1

File tree

2 files changed

+16
-12
lines changed

2 files changed

+16
-12
lines changed

src/cli.rs

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ use url::Url;
2323

2424
use crate::{
2525
oidc::{self, OpenidConfig},
26-
option::{validation, Compression, Mode}, storage::{AzureBlobConfig, FSConfig, S3Config},
26+
option::{validation, Compression, Mode},
27+
storage::{AzureBlobConfig, FSConfig, S3Config},
2728
};
2829

2930
#[cfg(any(
@@ -43,7 +44,6 @@ use std::string::String as KafkaSslProtocol;
4344
pub const DEFAULT_USERNAME: &str = "admin";
4445
pub const DEFAULT_PASSWORD: &str = "admin";
4546

46-
4747
#[derive(Parser)]
4848
#[command(
4949
name = "parseable",
@@ -81,11 +81,11 @@ pub struct Cli {
8181
#[derive(Parser)]
8282
pub enum StorageOptions {
8383
#[command(name = "local-store")]
84-
Local(LocalStoreArgs),
85-
84+
Local(LocalStoreArgs),
85+
8686
#[command(name = "s3-store")]
8787
S3(S3StoreArgs),
88-
88+
8989
#[command(name = "blob-store")]
9090
Blob(BlobStoreArgs),
9191
}
@@ -125,7 +125,7 @@ pub struct Options {
125125

126126
// Server configuration
127127
#[arg(
128-
long,
128+
long,
129129
env = "P_ADDR",
130130
default_value = "0.0.0.0:8000",
131131
value_parser = validation::socket_addr,
@@ -381,13 +381,13 @@ pub struct Options {
381381
)]
382382
pub audit_logger: Option<Url>,
383383

384-
#[arg(long ,env = "P_AUDIT_USERNAME", help = "Audit logger username")]
384+
#[arg(long, env = "P_AUDIT_USERNAME", help = "Audit logger username")]
385385
pub audit_username: Option<String>,
386386

387-
#[arg(long ,env = "P_AUDIT_PASSWORD", help = "Audit logger password")]
387+
#[arg(long, env = "P_AUDIT_PASSWORD", help = "Audit logger password")]
388388
pub audit_password: Option<String>,
389389

390-
#[arg(long ,env = "P_MS_CLARITY_TAG", help = "Tag for MS Clarity")]
390+
#[arg(long, env = "P_MS_CLARITY_TAG", help = "Tag for MS Clarity")]
391391
pub ms_clarity_tag: Option<String>,
392392
}
393393

@@ -405,7 +405,11 @@ impl Options {
405405
}
406406

407407
pub fn openid(&self) -> Option<OpenidConfig> {
408-
match (&self.oidc_client_id, &self.oidc_client_secret, &self.oidc_issuer) {
408+
match (
409+
&self.oidc_client_id,
410+
&self.oidc_client_secret,
411+
&self.oidc_issuer,
412+
) {
409413
(Some(id), Some(secret), Some(issuer)) => {
410414
let origin = if let Some(url) = self.domain_address.clone() {
411415
oidc::Origin::Production(url)

src/handlers/http/correlation.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*
1717
*/
1818

19-
use actix_web::{web, HttpRequest, Responder};
19+
use actix_web::{web, HttpRequest, HttpResponse, Responder};
2020
use bytes::Bytes;
2121
use itertools::Itertools;
2222
use relative_path::RelativePathBuf;
@@ -151,5 +151,5 @@ pub async fn delete(req: HttpRequest) -> Result<impl Responder, CorrelationError
151151

152152
// Delete from memory
153153
CORRELATIONS.delete(correlation_id).await?;
154-
Ok(format!("Deleted correlation with ID- {correlation_id}"))
154+
Ok(HttpResponse::Ok().finish())
155155
}

0 commit comments

Comments
 (0)