diff --git a/src/main/scala/gitbucket/core/controller/api/ApiIssueLabelControllerBase.scala b/src/main/scala/gitbucket/core/controller/api/ApiIssueLabelControllerBase.scala index 307a4db..688b498 100644 --- a/src/main/scala/gitbucket/core/controller/api/ApiIssueLabelControllerBase.scala +++ b/src/main/scala/gitbucket/core/controller/api/ApiIssueLabelControllerBase.scala @@ -121,7 +121,7 @@ */ post("/api/v3/repos/:owner/:repository/issues/:id/labels")(writableUsersOnly { repository => JsonFormat(for { - data <- extractFromJsonBody[Seq[String]]; + data <- extractFromJsonBody[Seq[String]] issueId <- params("id").toIntOpt } yield { data.map { labelName => @@ -160,7 +160,7 @@ */ put("/api/v3/repos/:owner/:repository/issues/:id/labels")(writableUsersOnly { repository => JsonFormat(for { - data <- extractFromJsonBody[Seq[String]]; + data <- extractFromJsonBody[Seq[String]] issueId <- params("id").toIntOpt } yield { deleteAllIssueLabels(repository.owner, repository.name, issueId, true) diff --git a/src/test/scala/gitbucket/core/api/ApiIntegrationTest.scala b/src/test/scala/gitbucket/core/api/ApiIntegrationTest.scala index 4ec3062..574a69f 100644 --- a/src/test/scala/gitbucket/core/api/ApiIntegrationTest.scala +++ b/src/test/scala/gitbucket/core/api/ApiIntegrationTest.scala @@ -150,7 +150,7 @@ .content("create") .message("Create content") .path("README.md") - .commit(); + .commit() assert(createResult.getContent.isFile == true) assert(IOUtils.toString(createResult.getContent.read(), "UTF-8") == "create") @@ -168,7 +168,7 @@ .message("Update content") .path("README.md") .sha(content1.getSha) - .commit(); + .commit() assert(updateResult.getContent.isFile == true) assert(IOUtils.toString(updateResult.getContent.read(), "UTF-8") == "update")