Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
佳 邓
Gitlab4j Api
Commits
7b6f8b32
Commit
7b6f8b32
authored
Sep 12, 2018
by
Greg Messner
Browse files
Fixed blockUser() and unblockUser() for V3 (#251).
parent
880b5a31
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/org/gitlab4j/api/UserApi.java
View file @
7b6f8b32
...
...
@@ -127,7 +127,11 @@ public class UserApi extends AbstractApi {
throw
new
RuntimeException
(
"userId cannot be null"
);
}
post
(
Response
.
Status
.
CREATED
,
(
Form
)
null
,
"users"
,
userId
,
"block"
);
if
(
isApiVersion
(
ApiVersion
.
V3
))
{
put
(
Response
.
Status
.
CREATED
,
null
,
"users"
,
userId
,
"block"
);
}
else
{
post
(
Response
.
Status
.
CREATED
,
(
Form
)
null
,
"users"
,
userId
,
"block"
);
}
}
/**
...
...
@@ -144,7 +148,11 @@ public class UserApi extends AbstractApi {
throw
new
RuntimeException
(
"userId cannot be null"
);
}
post
(
Response
.
Status
.
CREATED
,
(
Form
)
null
,
"users"
,
userId
,
"unblock"
);
if
(
isApiVersion
(
ApiVersion
.
V3
))
{
put
(
Response
.
Status
.
CREATED
,
null
,
"users"
,
userId
,
"unblock"
);
}
else
{
post
(
Response
.
Status
.
CREATED
,
(
Form
)
null
,
"users"
,
userId
,
"unblock"
);
}
}
/**
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment