mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-23 02:27:40 +08:00
remove the route to get identifier on settings; fix #502
This commit is contained in:
parent
f4ae0844ab
commit
8aeddec982
@ -83,9 +83,6 @@ pub fn load_routes(app: &mut tide::Server<Data>) {
|
||||
.post(|ctx| into_response(setting::update_distinct(ctx)))
|
||||
.delete(|ctx| into_response(setting::delete_distinct(ctx)));
|
||||
|
||||
app.at("/indexes/:index/settings/identifier")
|
||||
.get(|ctx| into_response(setting::get_identifier(ctx)));
|
||||
|
||||
app.at("/indexes/:index/settings/searchable-attributes")
|
||||
.get(|ctx| into_response(setting::get_searchable(ctx)))
|
||||
.post(|ctx| into_response(setting::update_searchable(ctx)))
|
||||
|
@ -255,19 +255,6 @@ pub async fn delete_distinct(ctx: Request<Data>) -> SResult<Response> {
|
||||
Ok(tide::Response::new(202).body_json(&response_body)?)
|
||||
}
|
||||
|
||||
pub async fn get_identifier(ctx: Request<Data>) -> SResult<Response> {
|
||||
ctx.is_allowed(Private)?;
|
||||
let index = ctx.index()?;
|
||||
let db = &ctx.state().db;
|
||||
let reader = db.main_read_txn()?;
|
||||
|
||||
let schema = index.main.schema(&reader)?;
|
||||
|
||||
let identifier = schema.map(|s| s.identifier().to_string());
|
||||
|
||||
Ok(tide::Response::new(200).body_json(&identifier).unwrap())
|
||||
}
|
||||
|
||||
pub async fn get_searchable(ctx: Request<Data>) -> SResult<Response> {
|
||||
ctx.is_allowed(Private)?;
|
||||
let index = ctx.index()?;
|
||||
|
Loading…
Reference in New Issue
Block a user