Add TODO to retrieving the current timestamp.

This commit is contained in:
takezoe
2013-06-23 03:06:22 +09:00
parent bc607661a9
commit 7b8edb3ec4
5 changed files with 9 additions and 2 deletions

View File

@@ -38,7 +38,7 @@ trait AccountControllerBase extends ControllerBase {
post("/:userName/_edit", form)(ownerOnly { form =>
val userName = params("userName")
val currentDate = new java.sql.Timestamp(System.currentTimeMillis)
val currentDate = new java.sql.Timestamp(System.currentTimeMillis) // TODO make a common function to get the current timestamp.
updateAccount(getAccountByUserName(userName).get.copy(
mailAddress = form.mailAddress,
url = form.url,

View File

@@ -127,7 +127,8 @@ trait IssuesControllerBase extends ControllerBase {
getMilestone(owner, repository, milestoneId) match {
case None => NotFound()
case Some(m) => {
val currentDate = new Timestamp(System.currentTimeMillis) // TODO move to trait?
// TODO make a common function to get the current timestamp.
val currentDate = new Timestamp(System.currentTimeMillis)
updateMilestone(m.copy(closedDate = Some(currentDate)))
redirect("/%s/%s/issues/milestones".format(owner, repository))
}

View File

@@ -36,6 +36,7 @@ trait UsersControllerBase extends ControllerBase { self: AccountService with Adm
})
post("/admin/users/_new", newForm)(adminOnly { form =>
// TODO make a common function to get the current timestamp.
val currentDate = new java.sql.Timestamp(System.currentTimeMillis)
createAccount(Account(
userName = form.userName,
@@ -57,6 +58,7 @@ trait UsersControllerBase extends ControllerBase { self: AccountService with Adm
post("/admin/users/:name/_edit", editForm)(adminOnly { form =>
val userName = params("userName")
// TODO make a common function to get the current timestamp.
val currentDate = new java.sql.Timestamp(System.currentTimeMillis)
updateAccount(getAccountByUserName(userName).get.copy(
password = form.password,