Create java.util.Date TypeMapper. And add the currentDate method.

This commit is contained in:
shimamoto
2013-06-23 20:46:08 +09:00
parent 83ff171782
commit 4326f34ef5
12 changed files with 68 additions and 74 deletions

View File

@@ -38,11 +38,9 @@ trait AccountControllerBase extends ControllerBase {
post("/:userName/_edit", form)(ownerOnly { form =>
val userName = params("userName")
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,
updatedDate = currentDate))
url = form.url))
redirect("/%s".format(userName))
})