feat: update hatter test
This commit is contained in:
@@ -1,14 +1,18 @@
|
|||||||
use axum::{routing::get, Router};
|
use axum::{routing::get, Router};
|
||||||
use sync_wrapper::SyncWrapper;
|
use sync_wrapper::SyncWrapper;
|
||||||
|
|
||||||
|
async fn root() -> &'static str {
|
||||||
|
"root"
|
||||||
|
}
|
||||||
|
|
||||||
async fn hello_world() -> &'static str {
|
async fn hello_world() -> &'static str {
|
||||||
"Hello, world!"
|
"Hello, world!"
|
||||||
}
|
}
|
||||||
|
|
||||||
#[shuttle_service::main]
|
#[shuttle_service::main]
|
||||||
async fn axum() -> shuttle_service::ShuttleAxum {
|
async fn axum() -> shuttle_service::ShuttleAxum {
|
||||||
let router = Router::new().route("/hello", get(hello_world));
|
let router = Router::new().route("/", get(root)).route("/hello", get(hello_world));
|
||||||
let sync_wrapper = SyncWrapper::new(router);
|
let sync_wrapper = SyncWrapper::new(router);
|
||||||
|
|
||||||
Ok(sync_wrapper)
|
Ok(sync_wrapper)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user