From 4d6c2ab94acf6c1e259f0c5c8f0d06e573f5b125 Mon Sep 17 00:00:00 2001 From: noellabo Date: Thu, 21 Sep 2023 17:55:01 +0900 Subject: [PATCH] Add search configuration to instance api --- app/serializers/rest/instance_serializer.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/serializers/rest/instance_serializer.rb b/app/serializers/rest/instance_serializer.rb index 14aeda9462d..e9639a08e1d 100644 --- a/app/serializers/rest/instance_serializer.rb +++ b/app/serializers/rest/instance_serializer.rb @@ -77,6 +77,13 @@ class REST::InstanceSerializer < ActiveModel::Serializer translation: { enabled: TranslationService.configured?, }, + + search: { + enabled: Chewy.enabled?, + supported_prefix: SearchQueryTransformer::SUPPORTED_PREFIXES, + supported_properties: SearchQueryTransformer::SUPPORTED_PROPERTIES, + supported_operator: SearchQueryTransformer::SUPPORTED_OPERATOR, + }, } end