Remove currentDate from controller.

This commit is contained in:
takezoe
2013-06-24 00:48:11 +09:00
parent 1997050a3a
commit 95f71e030b
2 changed files with 11 additions and 13 deletions

View File

@@ -36,18 +36,7 @@ trait UsersControllerBase extends ControllerBase { self: AccountService with Adm
})
post("/admin/users/_new", newForm)(adminOnly { form =>
// TODO I want to ban to use the currentDate in Controller.
val currentDate = new java.util.Date()
createAccount(Account(
userName = form.userName,
password = form.password,
mailAddress = form.mailAddress,
isAdmin = form.isAdmin,
url = form.url,
registeredDate = currentDate,
updatedDate = currentDate,
lastLoginDate = None))
createAccount(form.userName, form.password, form.mailAddress, form.isAdmin, form.url)
redirect("/admin/users")
})