Skip to content

Commit

Permalink
Reformat code
Browse files Browse the repository at this point in the history
  • Loading branch information
tbsklg committed Aug 26, 2024
1 parent b5499c6 commit 5302429
Showing 1 changed file with 10 additions and 14 deletions.
24 changes: 10 additions & 14 deletions infrastructure/strikes/src/put_strikes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,16 @@ async fn function_handler(request: Request) -> Result<Response<Body>, Error> {
tracing::info!("User: {:?}", user);

match user {
Some(user) => {
Ok(Response::builder()
.status(200)
.header("Content-Type", "text/plain")
.body(Body::from(format!("Hello, {}!", user)))
.unwrap())
}
None => {
Ok(Response::builder()
.status(400)
.header("Content-Type", "text/plain")
.body(Body::from("Missing user parameter"))
.unwrap())
}
Some(user) => Ok(Response::builder()
.status(200)
.header("Content-Type", "text/plain")
.body(Body::from(format!("Hello, {}!", user)))
.unwrap()),
None => Ok(Response::builder()
.status(400)
.header("Content-Type", "text/plain")
.body(Body::from("Missing user parameter"))
.unwrap()),
}
}

Expand Down

0 comments on commit 5302429

Please sign in to comment.