Skip to content

Commit d0df797

Browse files
prog: changed the parameters from indexUid to uid
1 parent eb7f772 commit d0df797

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/main/java/com/meilisearch/sdk/IndexesHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ TaskInfo updatePrimaryKey(String uid, String primaryKey) throws MeilisearchExcep
131131
*/
132132
TaskInfo updateIndexUid(String uid, String indexUid) throws MeilisearchException {
133133
HashMap<String, String> body = new HashMap<>();
134-
body.put("indexUid", indexUid);
134+
body.put("uid", indexUid);
135135
return httpClient.patch(indexesPath().addSubroute(uid).getURL(), body, TaskInfo.class);
136136
}
137137

src/test/java/com/meilisearch/sdk/IndexRenameTest.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,10 @@ void testRenameIndex() throws Exception {
4343
RecordedRequest req = server.takeRequest();
4444

4545
assertThat(req.getMethod(), equalTo("PATCH"));
46-
// FIX: Actual path includes double slash
4746
assertThat(req.getPath(), equalTo("//indexes/oldIndex"));
4847

4948
String body = req.getBody().readUtf8();
50-
assertThat(body, containsString("\"indexUid\":\"newIndex\""));
49+
assertThat(body, containsString("\"uid\":\"newIndex\""));
5150
assertThat(req.getHeader("Authorization"), equalTo("Bearer masterKey"));
5251
}
5352
}

0 commit comments

Comments
 (0)