Skip to content

Commit

Permalink
return 201 instead of 200 on user creation (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
EliMoshkovich authored Nov 14, 2024
1 parent 9064517 commit 48b4ed2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/io/permit/sdk/api/UsersApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ public CreateOrUpdateResult<UserRead> sync(UserCreate userData) throws IOExcepti
try (Response response = client.newCall(request).execute()) {
String responseString = processResponseBody(response);
UserRead result = (new Gson()).fromJson(responseString, UserRead.class);
boolean created = (response.code() == 200); // TODO: fix response code to 201
boolean created = (response.code() == 201);
return new CreateOrUpdateResult<UserRead>(result, created);
}
}
Expand Down

0 comments on commit 48b4ed2

Please sign in to comment.