From fe5df6d06fbc57a310b062cb327b80076e09a3a7 Mon Sep 17 00:00:00 2001 From: mpostma Date: Wed, 29 Sep 2021 19:04:47 +0200 Subject: [PATCH] fix payload content type guards --- meilisearch-http/src/routes/indexes/documents.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meilisearch-http/src/routes/indexes/documents.rs b/meilisearch-http/src/routes/indexes/documents.rs index 5f465c394..38aa4282f 100644 --- a/meilisearch-http/src/routes/indexes/documents.rs +++ b/meilisearch-http/src/routes/indexes/documents.rs @@ -33,9 +33,9 @@ macro_rules! guard_content_type { }; } +guard_content_type!(guard_ndjson, "application/x-ndjson"); +guard_content_type!(guard_csv, "text/csv"); guard_content_type!(guard_json, "application/json"); -guard_content_type!(guard_csv, "application/csv"); -guard_content_type!(guard_ndjson, "application/ndjson"); fn empty_application_type(head: &actix_web::dev::RequestHead) -> bool { head.headers.get("Content-Type").is_none()