mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-09 15:05:50 +01:00
Remove unused code and add TODO comment.
This commit is contained in:
@@ -23,6 +23,8 @@ trait ProjectService { self: AccountService =>
|
||||
def createProject(repositoryName: String, userName: String, description: Option[String]): Long = {
|
||||
// TODO create a git repository also here?
|
||||
|
||||
// TODO insert default labels.
|
||||
|
||||
val currentDate = new java.sql.Date(System.currentTimeMillis)
|
||||
|
||||
Repositories.* insert
|
||||
@@ -79,14 +81,12 @@ trait ProjectService { self: AccountService =>
|
||||
account match {
|
||||
case Some(x) => {
|
||||
(Query(Repositories) sortBy(_.lastActivityDate desc) list) map { repository =>
|
||||
// TODO ユーザ名はジョインして取得する?
|
||||
val repositoryInfo = JGitUtil.getRepositoryInfo(repository.userName, repository.repositoryName, servletContext)
|
||||
RepositoryInfo(repositoryInfo.owner, repositoryInfo.name, repositoryInfo.url, repository, repositoryInfo.branchList, repositoryInfo.tags)
|
||||
}
|
||||
}
|
||||
case None => {
|
||||
(Query(Repositories) filter(_.repositoryType is Public.bind) sortBy(_.lastActivityDate desc) list) map { repository =>
|
||||
// TODO ユーザ名はジョインして取得する?
|
||||
val repositoryInfo = JGitUtil.getRepositoryInfo(repository.userName, repository.repositoryName, servletContext)
|
||||
RepositoryInfo(repositoryInfo.owner, repositoryInfo.name, repositoryInfo.url, repository, repositoryInfo.branchList, repositoryInfo.tags)
|
||||
}
|
||||
@@ -101,10 +101,6 @@ trait ProjectService { self: AccountService =>
|
||||
|
||||
}
|
||||
|
||||
// private def getUserName(userId: Long): String = getAccountByUserId(userId).get.userName
|
||||
//
|
||||
// private def getUserId(userName: String): Long = getAccountByUserName(userName).get.userId.get
|
||||
|
||||
}
|
||||
|
||||
object ProjectService {
|
||||
|
||||
Reference in New Issue
Block a user