Implementing label editing form.

This commit is contained in:
takezoe
2013-06-25 03:17:23 +09:00
parent f5f408fb55
commit 65ac07a0fe
4 changed files with 44 additions and 30 deletions

View File

@@ -16,6 +16,11 @@ trait LabelsService {
.sortBy(_.labelName asc)
.list
def getLabel(owner: String, repository: String, labelId: Int): Option[Label] =
Query(Labels)
.filter(l => (l.userName is owner.bind) && (l.repositoryName is repository.bind) && (l.labelId is labelId.bind))
.firstOption
def createLabel(owner: String, repository: String, labelName: String, color: String): Unit =
Labels.ins insert (owner, repository, labelName, color)