Pass the Account object instead of the user name to user.scala.html.

This commit is contained in:
takezoe
2013-06-02 19:43:21 +09:00
parent f92018ee50
commit 1b1f5d5b02
2 changed files with 7 additions and 9 deletions

View File

@@ -11,14 +11,12 @@ import org.eclipse.jgit.lib._
import org.apache.commons.io.FileUtils
import org.eclipse.jgit.treewalk._
// TODO Should models move to other package?
class RepositoryViewerController extends RepositoryViewerControllerBase with ProjectService with AccountService
/**
* The repository viewer.
*/
trait RepositoryViewerControllerBase extends ControllerBase { self: ProjectService =>
trait RepositoryViewerControllerBase extends ControllerBase { self: ProjectService with AccountService =>
// TODO separate to AccountController?
/**
@@ -27,7 +25,7 @@ trait RepositoryViewerControllerBase extends ControllerBase { self: ProjectServi
get("/:owner") {
val owner = params("owner")
html.user(owner, getRepositories(owner, servletContext))
html.user(getAccountByUserName(owner).get, getRepositories(owner, servletContext))
}
/**