优化结构

This commit is contained in:
Yvan
2026-08-21 22:54:40 +08:00
parent e4ba0dced9
commit 430feaaff6
20 changed files with 604 additions and 20 deletions
+7
View File
@@ -70,6 +70,13 @@ func (s *IntegrationConfigService) Save(ctx context.Context, kind, provider stri
return s.uc.Save(ctx, &biz.IntegrationConfig{Kind: kind, Provider: provider, Enabled: req.Enabled, Values: req.Config})
}
func (s *IntegrationConfigService) Test(ctx context.Context, kind, provider string, req *dto.IntegrationConfigRequest) error {
if req == nil {
return s.uc.Test(ctx, nil)
}
return s.uc.Test(ctx, &biz.IntegrationConfig{Kind: kind, Provider: provider, Enabled: true, Values: req.Config})
}
func (s *IntegrationConfigService) Delete(ctx context.Context, kind, provider string) error {
return s.uc.Delete(ctx, kind, provider)
}