log index updated

This commit is contained in:
Tamo 2021-10-12 15:00:04 +02:00 committed by marin postma
parent 0616f68eb0
commit 0b3e0a59cb
No known key found for this signature in database
GPG Key ID: 6088B7721C3E39F9
1 changed files with 5 additions and 0 deletions

View File

@ -98,9 +98,14 @@ pub async fn update_index(
meilisearch: GuardedData<Private, MeiliSearch>,
path: web::Path<IndexParam>,
body: web::Json<UpdateIndexRequest>,
analytics: web::Data<&'static dyn Analytics>,
) -> Result<HttpResponse, ResponseError> {
debug!("called with params: {:?}", body);
let body = body.into_inner();
analytics.publish(
"Index Updated".to_string(),
json!({ "with_primary_key": body.primary_key}),
);
let settings = IndexSettings {
uid: body.uid,
primary_key: body.primary_key,