Add AccountService#updateAccount()

This commit is contained in:
takezoe
2013-06-04 13:59:21 +09:00
parent 597e3d251c
commit 315da9caa5
2 changed files with 25 additions and 4 deletions

View File

@@ -55,7 +55,14 @@ trait UsersControllerBase extends ControllerBase { self: AccountService =>
}
post("/admin/users/:name/_edit", editForm){ form =>
// TODO Update Account
val userName = params("userName")
val currentDate = new java.sql.Date(System.currentTimeMillis)
updateAccount(getAccountByUserName(userName).get.copy(
password = form.password,
mailAddress = form.mailAddress,
userType = form.userType,
url = form.url,
updatedDate = currentDate))
redirect("/admin/users")
}