mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-03 03:47:02 +02:00
Bump serde-cs to simplify our usage of the star_or function
This commit is contained in:
parent
64b5b2e1f8
commit
277a0a7967
5 changed files with 13 additions and 32 deletions
|
@ -99,7 +99,7 @@ pub async fn get_document(
|
|||
let index = path.index_uid.clone();
|
||||
let id = path.document_id.clone();
|
||||
let GetDocument { fields } = params.into_inner();
|
||||
let attributes_to_retrieve = fields.map(CS::into_inner).and_then(fold_star_or);
|
||||
let attributes_to_retrieve = fields.and_then(fold_star_or);
|
||||
|
||||
let document = meilisearch
|
||||
.document(index, id, attributes_to_retrieve)
|
||||
|
@ -143,7 +143,7 @@ pub async fn get_all_documents(
|
|||
offset,
|
||||
fields,
|
||||
} = params.into_inner();
|
||||
let attributes_to_retrieve = fields.map(CS::into_inner).and_then(fold_star_or);
|
||||
let attributes_to_retrieve = fields.and_then(fold_star_or);
|
||||
|
||||
let (total, documents) = meilisearch
|
||||
.documents(path.into_inner(), offset, limit, attributes_to_retrieve)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue