mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 04:17:10 +02:00
rebase from master
This commit is contained in:
parent
2143226f04
commit
dc6907e748
29 changed files with 92 additions and 105 deletions
|
@ -5,6 +5,7 @@ use log::{error, warn};
|
|||
use serde::{Deserialize, Serialize};
|
||||
use tide::IntoResponse;
|
||||
use tide::Response;
|
||||
use meilisearch_core::{HeedError, FstError};
|
||||
|
||||
use crate::helpers::meilisearch::Error as SearchError;
|
||||
|
||||
|
@ -139,14 +140,14 @@ impl From<meilisearch_core::Error> for ResponseError {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<heed::Error> for ResponseError {
|
||||
fn from(err: heed::Error) -> ResponseError {
|
||||
impl From<HeedError> for ResponseError {
|
||||
fn from(err: HeedError) -> ResponseError {
|
||||
ResponseError::internal(err)
|
||||
}
|
||||
}
|
||||
|
||||
impl From<meilisearch_core::FstError> for ResponseError {
|
||||
fn from(err: meilisearch_core::FstError) -> ResponseError {
|
||||
impl From<FstError> for ResponseError {
|
||||
fn from(err: FstError) -> ResponseError {
|
||||
ResponseError::internal(err)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@ pub fn load_routes(app: &mut tide::Server<Data>) {
|
|||
}
|
||||
});
|
||||
|
||||
app.at("/indexes/")
|
||||
app.at("/indexes")
|
||||
.get(|ctx| into_response(index::list_indexes(ctx)))
|
||||
.post(|ctx| into_response(index::create_index(ctx)));
|
||||
|
||||
|
@ -95,7 +95,7 @@ pub fn load_routes(app: &mut tide::Server<Data>) {
|
|||
.post(|ctx| into_response(setting::update_searchable(ctx)))
|
||||
.delete(|ctx| into_response(setting::delete_searchable(ctx)));
|
||||
|
||||
app.at("/indexes/:index/settings/displayed-attribute")
|
||||
app.at("/indexes/:index/settings/displayed-attributes")
|
||||
.get(|ctx| into_response(setting::displayed(ctx)))
|
||||
.post(|ctx| into_response(setting::update_displayed(ctx)))
|
||||
.delete(|ctx| into_response(setting::delete_displayed(ctx)));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue