- replace literal 'admin' with const

This commit is contained in:
gazebo
2019-03-12 15:53:13 +08:00
parent c46f1597f1
commit 3113e9d603
8 changed files with 14 additions and 9 deletions

View File

@@ -46,7 +46,7 @@ func (*UserProvider) GetUser(authID, authIDType string) (user auth2.IUser) {
func (*UserProvider) UpdateUserMobile(userID string, mobile string) (err error) {
_, err = dao.UpdateEntityLogically(dao.GetDB(), &model.User{}, map[string]interface{}{
"Mobile": mobile,
}, "admin", map[string]interface{}{
}, model.AdminName, map[string]interface{}{
"UserID": userID,
})
return err
@@ -55,7 +55,7 @@ func (*UserProvider) UpdateUserMobile(userID string, mobile string) (err error)
func (*UserProvider) UpdateUserEmail(userID string, email string) (err error) {
_, err = dao.UpdateEntityLogically(dao.GetDB(), &model.User{}, map[string]interface{}{
"Email": email,
}, "admin", map[string]interface{}{
}, model.AdminName, map[string]interface{}{
"UserID": userID,
})
return err