Skip to content

Commit

Permalink
style
Browse files Browse the repository at this point in the history
  • Loading branch information
otary committed Nov 22, 2024
1 parent c6e9689 commit 5294600
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/main/java/org/gitlab4j/api/UserApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -833,7 +833,10 @@ public SshKey addSshKey(Long userId, String title, String key) throws GitLabApiE
* @throws GitLabApiException if any exception occurs
*/
public SshKey addSshKey(Long userId, String title, String key, Date expiresAt) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm().withParam("title", title).withParam("key", key).withParam("expires_at", expiresAt);
GitLabApiForm formData = new GitLabApiForm()
.withParam("title", title)
.withParam("key", key)
.withParam("expires_at", expiresAt);
Response response = post(Response.Status.CREATED, formData, "user", "keys");
return (response.readEntity(SshKey.class));
}
Expand Down Expand Up @@ -1024,7 +1027,7 @@ public void revokePersonalAccessToken(Long tokenId) throws GitLabApiException {
}

Response.Status expectedStatus =
(isApiVersion(ApiVersion.V3) ? Response.Status.OK : Response.Status.NO_CONTENT);
(isApiVersion(ApiVersion.V3) ? Response.Status.OK : Response.Status.NO_CONTENT);
delete(expectedStatus, null, "personal_access_tokens", tokenId);
}
// as per https://docs.gitlab.com/ee/api/README.html#impersonation-tokens, impersonation tokens are a type of
Expand Down

0 comments on commit 5294600

Please sign in to comment.