ExtSvcAuth: Refactor external service registry to use ExternalServiceRegistry variables (#78056)

ExtSvcAuth: Refactor external service registry to use ExternalServiceRegistry
This commit is contained in:
Gabriel MABILLE
2023-11-13 16:23:11 +01:00
committed by GitHub
parent 7617a7a3fc
commit fe8d0e6381
8 changed files with 45 additions and 22 deletions
+3 -2
View File
@@ -160,10 +160,11 @@ func (m *PluginInstaller) Remove(ctx context.Context, pluginID string) error {
}
}
if m.serviceRegistry.HasExternalService(ctx, pluginID) {
has, err := m.serviceRegistry.HasExternalService(ctx, pluginID)
if err == nil && has {
return m.serviceRegistry.RemoveExternalService(ctx, pluginID)
}
return nil
return err
}
// plugin finds a plugin with `pluginID` from the store