Remove unnecessary code.

This commit is contained in:
shimamoto
2013-06-25 11:31:13 +09:00
parent 4f873d9296
commit 86221a5dca

View File

@@ -3,31 +3,23 @@ package app
import jp.sf.amateras.scalatra.forms._
import service._
import util.{WritableRepositoryAuthenticator, ReadableRepositoryAuthenticator, UsersOnlyAuthenticator}
import util.UsersOnlyAuthenticator
class IssuesController extends IssuesControllerBase
with IssuesService with RepositoryService with AccountService with LabelsService
with UsersOnlyAuthenticator with ReadableRepositoryAuthenticator with WritableRepositoryAuthenticator
with UsersOnlyAuthenticator
trait IssuesControllerBase extends ControllerBase {
self: IssuesService with RepositoryService with LabelsService
with UsersOnlyAuthenticator with ReadableRepositoryAuthenticator with WritableRepositoryAuthenticator =>
with UsersOnlyAuthenticator =>
case class IssueForm(title: String, content: Option[String])
case class MilestoneForm(title: String, description: Option[String], dueDate: Option[java.util.Date])
val form = mapping(
"title" -> trim(label("Title", text(required))),
"content" -> trim(optional(text()))
)(IssueForm.apply)
val milestoneForm = mapping(
"title" -> trim(label("Title", text(required, maxlength(100)))),
"description" -> trim(label("Description", optional(text()))),
"dueDate" -> trim(label("Due Date", optional(date())))
)(MilestoneForm.apply)
get("/:owner/:repository/issues"){
val owner = params("owner")
val repository = params("repository")