Skip to content

Commit 55edd85

Browse files
authored
feat: correlation API response change (#1099)
1 parent b016b38 commit 55edd85

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/handlers/http/correlation.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ pub async fn post(req: HttpRequest, body: Bytes) -> Result<impl Responder, Corre
8282
// Save to memory
8383
CORRELATIONS.update(&correlation).await?;
8484

85-
Ok(format!("Saved correlation with ID- {}", correlation.id))
85+
Ok(web::Json(correlation))
8686
}
8787

8888
pub async fn modify(req: HttpRequest, body: Bytes) -> Result<impl Responder, CorrelationError> {
@@ -117,7 +117,7 @@ pub async fn modify(req: HttpRequest, body: Bytes) -> Result<impl Responder, Cor
117117
// Save to memory
118118
CORRELATIONS.update(&correlation).await?;
119119

120-
Ok(format!("Modified correlation with ID- {}", correlation.id))
120+
Ok(web::Json(correlation))
121121
}
122122

123123
pub async fn delete(req: HttpRequest) -> Result<impl Responder, CorrelationError> {

0 commit comments

Comments
 (0)