cargo fmt

This commit is contained in:
qdequele 2020-01-28 17:46:51 +01:00
parent f498bfed51
commit 14b5fc4d6c
No known key found for this signature in database
GPG Key ID: B3F0A000EBF11745
2 changed files with 5 additions and 3 deletions

View File

@ -151,7 +151,9 @@ pub async fn create_index(mut ctx: Request<Data>) -> SResult<Response> {
.into_internal_error()?;
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()?;

View File

@ -86,11 +86,11 @@ pub struct UpdateSettings {
pub index_new_fields: Option<bool>,
}
pub async fn update_all(mut ctx: Request<Data>) -> SResult<Response> {
ctx.is_allowed(SettingsWrite)?;
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 settings = Settings {