Commit 4dabe711 authored by Greg Messner's avatar Greg Messner
Browse files

Fixed disableRunner() (#315).

parent aeaee888
......@@ -457,8 +457,7 @@ public class RunnersApi extends AbstractApi {
* @throws GitLabApiException if any exception occurs
*/
public Runner enableRunner(Object projectIdOrPath, Integer runnerId) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm()
.withParam("runner_id", runnerId, true);
GitLabApiForm formData = new GitLabApiForm().withParam("runner_id", runnerId, true);
Response response = post(Response.Status.CREATED, formData.asMap(),
"projects", getProjectIdOrPath(projectIdOrPath), "runners");
return (response.readEntity(Runner.class));
......@@ -476,9 +475,8 @@ public class RunnersApi extends AbstractApi {
* @throws GitLabApiException if any exception occurs
*/
public Runner disableRunner(Object projectIdOrPath, Integer runnerId) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm().withParam("runner_id", runnerId, true);
Response response = delete(Response.Status.OK, formData.asMap(),
"projects", getProjectIdOrPath(projectIdOrPath), "runners");
Response response = delete(Response.Status.OK, null,
"projects", getProjectIdOrPath(projectIdOrPath), "runners", runnerId);
return (response.readEntity(Runner.class));
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment