mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 12:27:13 +02:00
cargo fmt
This commit is contained in:
parent
f182afc50b
commit
dda08d60d2
14 changed files with 77 additions and 67 deletions
|
@ -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)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue