mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
pointer struct to members crud.
This commit is contained in:
@ -132,6 +132,11 @@ func (manager *SessionManagerCtx) Update(id string, profile types.MemberProfile)
|
||||
return fmt.Errorf("Member not found.")
|
||||
}
|
||||
|
||||
// preserve secret if not updated
|
||||
if profile.Secret == "" {
|
||||
profile.Secret = session.profile.Secret
|
||||
}
|
||||
|
||||
err := manager.database.Update(id, profile)
|
||||
if err != nil {
|
||||
manager.membersMu.Unlock()
|
||||
|
Reference in New Issue
Block a user