cargo fmt

This commit is contained in:
qdequele 2020-02-26 18:49:17 +01:00
parent f182afc50b
commit dda08d60d2
No known key found for this signature in database
GPG key ID: B3F0A000EBF11745
14 changed files with 77 additions and 67 deletions

View file

@ -23,19 +23,15 @@ async fn into_response<T: IntoResponse, U: IntoResponse>(
}
pub fn load_routes(app: &mut tide::Server<Data>) {
app.at("/").get(|_| {
async move {
tide::Response::new(200)
.body_string(include_str!("../../public/interface.html").to_string())
.set_mime(mime::TEXT_HTML_UTF_8)
}
app.at("/").get(|_| async {
tide::Response::new(200)
.body_string(include_str!("../../public/interface.html").to_string())
.set_mime(mime::TEXT_HTML_UTF_8)
});
app.at("/bulma.min.css").get(|_| {
async {
tide::Response::new(200)
.body_string(include_str!("../../public/bulma.min.css").to_string())
.set_mime(mime::TEXT_CSS_UTF_8)
}
app.at("/bulma.min.css").get(|_| async {
tide::Response::new(200)
.body_string(include_str!("../../public/bulma.min.css").to_string())
.set_mime(mime::TEXT_CSS_UTF_8)
});
app.at("/indexes")
@ -117,8 +113,7 @@ pub fn load_routes(app: &mut tide::Server<Data>) {
app.at("/indexes/:index/stats")
.get(|ctx| into_response(stats::index_stats(ctx)));
app.at("/keys/")
.get(|ctx| into_response(key::list(ctx)));
app.at("/keys/").get(|ctx| into_response(key::list(ctx)));
app.at("/health")
.get(|ctx| into_response(health::get_health(ctx)))