Skip to content

Commit

Permalink
[Quaaantum]: added index forwardToReplicas
Browse files Browse the repository at this point in the history
  • Loading branch information
quaaantumdev committed May 22, 2024
1 parent b88244f commit 4f79702
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/src/index_settings.dart
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,15 @@ class AlgoliaSettings {
}.toString();
}

Future<AlgoliaTask> setSettings() async {
Future<AlgoliaTask> setSettings({
required bool forwardToReplicas,
}) async {
assert(
_parameters.keys.isNotEmpty, 'No setting parameter to update found.');
var response = await algolia._apiCall(
ApiRequestType.put,
'indexes/$encodedIndex/settings',
'indexes/$encodedIndex/settings' +
(forwardToReplicas ? '?forwardToReplicas=true' : ''),
data: _parameters,
);
Map<String, dynamic> body = json.decode(response.body);
Expand Down

0 comments on commit 4f79702

Please sign in to comment.