aboutsummaryrefslogtreecommitdiff
path: root/src/handlers/smoke.rs
blob: d0a1038ba236d017fcef7349b0a6d53b48a6f9d2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use actix_web::{get, post, HttpResponse, Responder};

#[get("/")]
async fn hello() -> impl Responder {
    HttpResponse::Ok().body("Hello world!")
}

#[post("/echo")]
async fn echo(req_body: String) -> impl Responder {
    HttpResponse::Ok().body(req_body)
}

pub async fn manual_hello() -> impl Responder {
    HttpResponse::Ok().body("Hey there!")
}