From 48b4ed205075d306299e39e3cd5e07fb24e7eaee Mon Sep 17 00:00:00 2001 From: Eli Moshkovich Date: Thu, 14 Nov 2024 10:18:44 -0800 Subject: [PATCH] return 201 instead of 200 on user creation (#28) --- src/main/java/io/permit/sdk/api/UsersApi.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/io/permit/sdk/api/UsersApi.java b/src/main/java/io/permit/sdk/api/UsersApi.java index 740a16d..84340ea 100644 --- a/src/main/java/io/permit/sdk/api/UsersApi.java +++ b/src/main/java/io/permit/sdk/api/UsersApi.java @@ -252,7 +252,7 @@ public CreateOrUpdateResult 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(result, created); } }