(refs #28)Implementing avatar image uploading.

This commit is contained in:
takezoe
2013-07-10 11:34:36 +09:00
parent 2c33abe5d1
commit e4324258d3
8 changed files with 65 additions and 15 deletions

View File

@@ -23,7 +23,8 @@ trait AccountService {
url = url,
registeredDate = currentDate,
updatedDate = currentDate,
lastLoginDate = None)
lastLoginDate = None,
image = None)
def updateAccount(account: Account): Unit =
Accounts
@@ -37,7 +38,10 @@ trait AccountService {
account.registeredDate,
currentDate,
account.lastLoginDate)
def updateAvatarImage(userName: String, image: Option[String]): Unit =
Accounts.filter(_.userName is userName.bind).map(_.image.?).update(image)
def updateLastLoginDate(userName: String): Unit =
Accounts.filter(_.userName is userName.bind).map(_.lastLoginDate).update(currentDate)