MSP-5014 Try get rid of global service and autocomplete

This commit is contained in:
Синельник Тимур Романович committed 2025-03-24 11:30:39 +03:00
1 parent 84f639a9d3
commit c267b1ae6e
15 files changed
+468 -335

No files matched your search

+6 -3
View File
@@ -2,11 +2,14 @@ package utils
import (
"ispctl/model"
"ispctl/service"
)
func CreateUpdateConfig(stringToChange string, configuration *model.Config) error {
answer, err := service.Config.CreateUpdateConfig(stringToChange, configuration)
type UpdateConfigService interface {
CreateUpdateConfig(stringToChange string, configuration *model.Config) (map[string]any, error)
}
func CreateUpdateConfig(stringToChange string, configuration *model.Config, service UpdateConfigService) error {
answer, err := service.CreateUpdateConfig(stringToChange, configuration)
if err != nil {
return err
} else if answer != nil {