diff options
author | Akshay <[email protected]> | 2020-12-24 05:21:40 +0000 |
---|---|---|
committer | Akshay <[email protected]> | 2020-12-24 05:21:40 +0000 |
commit | 9d2b6ee10ec5359cc91769d430485c8c869ba1a8 (patch) | |
tree | b2d541e575ab6e3f70cb709f156f06afca085881 /backend/src/handlers/smoke.rs | |
parent | 7c65421328552b08e64df25e224fe9d54d363e6e (diff) |
monorepo
Diffstat (limited to 'backend/src/handlers/smoke.rs')
-rw-r--r-- | backend/src/handlers/smoke.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/backend/src/handlers/smoke.rs b/backend/src/handlers/smoke.rs new file mode 100644 index 0000000..d0a1038 --- /dev/null +++ b/backend/src/handlers/smoke.rs | |||
@@ -0,0 +1,15 @@ | |||
1 | use actix_web::{get, post, HttpResponse, Responder}; | ||
2 | |||
3 | #[get("/")] | ||
4 | async fn hello() -> impl Responder { | ||
5 | HttpResponse::Ok().body("Hello world!") | ||
6 | } | ||
7 | |||
8 | #[post("/echo")] | ||
9 | async fn echo(req_body: String) -> impl Responder { | ||
10 | HttpResponse::Ok().body(req_body) | ||
11 | } | ||
12 | |||
13 | pub async fn manual_hello() -> impl Responder { | ||
14 | HttpResponse::Ok().body("Hey there!") | ||
15 | } | ||