mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-06 21:45:50 +01:00
(refs #28)Implementing avatar image uploading.
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user