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:
@@ -22,6 +22,8 @@ trait ProjectService { self: AccountService =>
|
|||||||
*/
|
*/
|
||||||
def createProject(repositoryName: String, userName: String, description: Option[String]): Long = {
|
def createProject(repositoryName: String, userName: String, description: Option[String]): Long = {
|
||||||
// TODO create a git repository also here?
|
// TODO create a git repository also here?
|
||||||
|
|
||||||
|
// TODO insert default labels.
|
||||||
|
|
||||||
val currentDate = new java.sql.Date(System.currentTimeMillis)
|
val currentDate = new java.sql.Date(System.currentTimeMillis)
|
||||||
|
|
||||||
@@ -79,14 +81,12 @@ trait ProjectService { self: AccountService =>
|
|||||||
account match {
|
account match {
|
||||||
case Some(x) => {
|
case Some(x) => {
|
||||||
(Query(Repositories) sortBy(_.lastActivityDate desc) list) map { repository =>
|
(Query(Repositories) sortBy(_.lastActivityDate desc) list) map { repository =>
|
||||||
// TODO ユーザ名はジョインして取得する?
|
|
||||||
val repositoryInfo = JGitUtil.getRepositoryInfo(repository.userName, repository.repositoryName, servletContext)
|
val repositoryInfo = JGitUtil.getRepositoryInfo(repository.userName, repository.repositoryName, servletContext)
|
||||||
RepositoryInfo(repositoryInfo.owner, repositoryInfo.name, repositoryInfo.url, repository, repositoryInfo.branchList, repositoryInfo.tags)
|
RepositoryInfo(repositoryInfo.owner, repositoryInfo.name, repositoryInfo.url, repository, repositoryInfo.branchList, repositoryInfo.tags)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
case None => {
|
case None => {
|
||||||
(Query(Repositories) filter(_.repositoryType is Public.bind) sortBy(_.lastActivityDate desc) list) map { repository =>
|
(Query(Repositories) filter(_.repositoryType is Public.bind) sortBy(_.lastActivityDate desc) list) map { repository =>
|
||||||
// TODO ユーザ名はジョインして取得する?
|
|
||||||
val repositoryInfo = JGitUtil.getRepositoryInfo(repository.userName, repository.repositoryName, servletContext)
|
val repositoryInfo = JGitUtil.getRepositoryInfo(repository.userName, repository.repositoryName, servletContext)
|
||||||
RepositoryInfo(repositoryInfo.owner, repositoryInfo.name, repositoryInfo.url, repository, repositoryInfo.branchList, repositoryInfo.tags)
|
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 {
|
object ProjectService {
|
||||||
|
|||||||
Reference in New Issue
Block a user