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 { ...@@ -457,8 +457,7 @@ public class RunnersApi extends AbstractApi {
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public Runner enableRunner(Object projectIdOrPath, Integer runnerId) throws GitLabApiException { public Runner enableRunner(Object projectIdOrPath, Integer runnerId) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm() GitLabApiForm formData = new GitLabApiForm().withParam("runner_id", runnerId, true);
.withParam("runner_id", runnerId, true);
Response response = post(Response.Status.CREATED, formData.asMap(), Response response = post(Response.Status.CREATED, formData.asMap(),
"projects", getProjectIdOrPath(projectIdOrPath), "runners"); "projects", getProjectIdOrPath(projectIdOrPath), "runners");
return (response.readEntity(Runner.class)); return (response.readEntity(Runner.class));
...@@ -476,9 +475,8 @@ public class RunnersApi extends AbstractApi { ...@@ -476,9 +475,8 @@ public class RunnersApi extends AbstractApi {
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public Runner disableRunner(Object projectIdOrPath, Integer runnerId) throws GitLabApiException { public Runner disableRunner(Object projectIdOrPath, Integer runnerId) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm().withParam("runner_id", runnerId, true); Response response = delete(Response.Status.OK, null,
Response response = delete(Response.Status.OK, formData.asMap(), "projects", getProjectIdOrPath(projectIdOrPath), "runners", runnerId);
"projects", getProjectIdOrPath(projectIdOrPath), "runners");
return (response.readEntity(Runner.class)); 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