Chore: Add user service method Update (#53300)

* Chore: Add user service method Update

* Remove UpdateUser from store interface
This commit is contained in:
idafurjes
2022-08-04 14:22:44 +02:00
committed by GitHub
parent 191ab3bb01
commit 6fdb6ea6f6
8 changed files with 43 additions and 22 deletions
+12
View File
@@ -267,3 +267,15 @@ func (s *Service) GetByEmail(ctx context.Context, query *user.GetUserByEmailQuer
}
return q.Result, nil
}
// TODO: remove wrapper around sqlstore
func (s *Service) Update(ctx context.Context, cmd *user.UpdateUserCommand) error {
q := &models.UpdateUserCommand{
Name: cmd.Name,
Email: cmd.Email,
Login: cmd.Login,
Theme: cmd.Theme,
UserId: cmd.UserID,
}
return s.sqlStore.UpdateUser(ctx, q)
}