Files
hfb_sys/backend/internal/modules/systemconfig/service_update.go
T

16 lines
361 B
Go

package systemconfig
import (
"context"
)
func (s *Service) Update(ctx context.Context, actorID uint64, key string, req UpdateRequest, meta AuditMeta) (*ConfigDTO, error) {
if s.repo == nil {
return nil, ErrDependencyUnavailable
}
if key == "" || req.Value == "" {
return nil, ErrInvalidConfig
}
return s.repo.Update(ctx, actorID, key, req, meta)
}