Skip to content

Commit

Permalink
comment
Browse files Browse the repository at this point in the history
  • Loading branch information
aleeusgr committed Jan 4, 2024
1 parent 4b1bfa6 commit d435380
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ async fn main() -> Result<()> {
.layer(CatchPanicLayer::custom(runtime::catch_panic))
// Mark headers as sensitive on both requests and responses.
.layer(SetSensitiveHeadersLayer::new([header::AUTHORIZATION]))
.route("/say-hello", get(say_hello))
.route("/say-hello", get(say_hello)) // change handler
// adds the following router to the self:
.merge(SwaggerUi::new("/swagger-ui").url("/api-doc/openapi.json", ApiDoc::openapi()));
//TODO: test layers.
Expand All @@ -123,6 +123,7 @@ async fn main() -> Result<()> {
}
// this is a handler, a function that is used in a Router
// integrate new functionality here:
// TODO: A | B example: serve a stream. roadmap - show webcam on laptop screen.
async fn say_hello() -> String {
return "Hello!".to_string();
}
Expand Down

0 comments on commit d435380

Please sign in to comment.