拆分系统配置 Service 文件职责
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
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)
|
||||
}
|
||||
Reference in New Issue
Block a user