Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge method pointing to incorrect endpoint #33

Open
pbr4ne opened this issue Mar 23, 2024 · 0 comments
Open

Merge method pointing to incorrect endpoint #33

pbr4ne opened this issue Mar 23, 2024 · 0 comments

Comments

@pbr4ne
Copy link

pbr4ne commented Mar 23, 2024

The UsersResource.merge method posts to the users/:user_id endpoint instead of posting to the users/:user_id/merge endpoint.

It looks like instead of calling userUrl it should be calling userMergeUrl.

public UserIdentity merge(String userId, String fromUserId) {
HttpUrl url = userUrl(userId);
Request request = knockHttp.baseJsonRequest(url)
.post(knockHttp.objectToJsonRequestBody(Collections.singletonMap("from_user_id", fromUserId)))
.build();
return knockHttp.executeWithResponseType(request, new TypeReference<UserIdentity>() {
});
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant