This commit is contained in:
takezoe
2014-04-29 15:44:58 +09:00
12 changed files with 696 additions and 569 deletions

View File

@@ -273,6 +273,12 @@ trait IssuesControllerBase extends ControllerBase {
}
})
get("/:owner/:repository/_attached/:file")(referrersOnly { repository =>
defining(new java.io.File(Directory.getAttachedDir(repository.owner, repository.name), params("file"))){ file =>
if(file.exists) file else NotFound
}
})
val assignedUserName = (key: String) => params.get(key) filter (_.trim != "")
val milestoneId: String => Option[Int] = (key: String) => params.get(key).flatMap(_.toIntOpt)