mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-11-25 22:34:28 +01:00
cargo fmt
This commit is contained in:
parent
f498bfed51
commit
14b5fc4d6c
@ -151,7 +151,9 @@ pub async fn create_index(mut ctx: Request<Data>) -> SResult<Response> {
|
|||||||
.into_internal_error()?;
|
.into_internal_error()?;
|
||||||
|
|
||||||
if let Some(id) = body.attribute_identifier {
|
if let Some(id) = body.attribute_identifier {
|
||||||
created_index.main.put_schema(&mut writer, &Schema::with_identifier(id))?;
|
created_index
|
||||||
|
.main
|
||||||
|
.put_schema(&mut writer, &Schema::with_identifier(id))?;
|
||||||
}
|
}
|
||||||
|
|
||||||
writer.commit()?;
|
writer.commit()?;
|
||||||
|
@ -86,11 +86,11 @@ pub struct UpdateSettings {
|
|||||||
pub index_new_fields: Option<bool>,
|
pub index_new_fields: Option<bool>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
pub async fn update_all(mut ctx: Request<Data>) -> SResult<Response> {
|
pub async fn update_all(mut ctx: Request<Data>) -> SResult<Response> {
|
||||||
ctx.is_allowed(SettingsWrite)?;
|
ctx.is_allowed(SettingsWrite)?;
|
||||||
let index = ctx.index()?;
|
let index = ctx.index()?;
|
||||||
let settings_update: UpdateSettings = ctx.body_json().await.map_err(ResponseError::bad_request)?;
|
let settings_update: UpdateSettings =
|
||||||
|
ctx.body_json().await.map_err(ResponseError::bad_request)?;
|
||||||
let db = &ctx.state().db;
|
let db = &ctx.state().db;
|
||||||
|
|
||||||
let settings = Settings {
|
let settings = Settings {
|
||||||
|
Loading…
Reference in New Issue
Block a user