|
@@ -68,9 +68,10 @@ func (s *managerService) Enable(id int, canLogin int) error {
|
|
|
Manager := models.CmManager{}
|
|
|
Manager.Id = id
|
|
|
Manager.CanLogin = canLogin
|
|
|
- err := s.dao.Update(&Manager, []string{"CanLogin"})
|
|
|
-
|
|
|
- return err
|
|
|
+ if err := s.dao.Update(&Manager, []string{"CanLogin"}); err != nil {
|
|
|
+ return err
|
|
|
+ }
|
|
|
+ return nil
|
|
|
}
|
|
|
|
|
|
func (s *managerService) Update(data *models.CmManager, columns []string) error {
|