surrealpatch/src/net/sync.rs

21 lines
383 B
Rust
Raw Normal View History

use axum::response::IntoResponse;
use axum::routing::get;
use axum::Router;
use http_body::Body as HttpBody;
2020-06-29 15:36:01 +00:00
pub(super) fn router<S, B>() -> Router<S, B>
where
B: HttpBody + Send + 'static,
S: Clone + Send + Sync + 'static,
{
Router::new().route("/sync", get(save).post(load))
2020-06-29 15:36:01 +00:00
}
async fn load() -> impl IntoResponse {
"Load"
2020-06-29 15:36:01 +00:00
}
async fn save() -> impl IntoResponse {
"Save"
2020-06-29 15:36:01 +00:00
}