Skip to content

Commit 9a796fb

Browse files
authored
Merge pull request #97 from apisearch-io/fix/fixed-create-index
Fixed index endpoint
2 parents 126c9ac + 5cca51d commit 9a796fb

File tree

2 files changed

+4
-41
lines changed

2 files changed

+4
-41
lines changed

App/HttpAppRepository.php

+4-6
Original file line numberDiff line numberDiff line change
@@ -168,15 +168,13 @@ public function createIndex(
168168
->httpClient
169169
->get(
170170
sprintf(
171-
'/%s/indices',
172-
$this->getAppUUID()->getId()
171+
'/%s/indices/%s',
172+
$this->getAppUUID()->getId(),
173+
$indexUUID->composeUUID()
173174
),
174175
'put',
175176
[],
176-
[
177-
Http::INDEX_FIELD => $indexUUID->toArray(),
178-
Http::CONFIG_FIELD => $config->toArray(),
179-
],
177+
$config->toArray(),
180178
Http::getApisearchHeaders($this)
181179
);
182180

Http/Http.php

-35
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,6 @@
2222
*/
2323
class Http
2424
{
25-
/**
26-
* @var string
27-
*
28-
* Index query param field
29-
*/
30-
const INDEX_FIELD = 'index';
31-
3225
/**
3326
* @var string
3427
*
@@ -50,34 +43,6 @@ class Http
5043
*/
5144
const QUERY_FIELD = 'query';
5245

53-
/**
54-
* @var string
55-
*
56-
* Config param field
57-
*/
58-
const CONFIG_FIELD = 'config';
59-
60-
/**
61-
* @var string
62-
*
63-
* Language query param field
64-
*/
65-
const LANGUAGE_FIELD = 'language';
66-
67-
/**
68-
* @var string
69-
*
70-
* From field
71-
*/
72-
const FROM_FIELD = 'from';
73-
74-
/**
75-
* @var string
76-
*
77-
* From field
78-
*/
79-
const TO_FIELD = 'to';
80-
8146
/**
8247
* @var string
8348
*

0 commit comments

Comments
 (0)