mirror of
https://github.com/stashapp/stash.git
synced 2025-12-06 16:34:02 +01:00
* Add types to graphql scalars * Upgrade dependencies * Override UI config type * Remove all IUIConfig casts * Add tableColumns to IUIConfig * Add BoolMap type, set strictScalars * Add PluginConfigMap * Replace any with unknown * Add SavedObjectFilter and SavedUIOptions * Remove unused items from CriterionType
25 lines
542 B
Go
25 lines
542 B
Go
package api
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/stashapp/stash/internal/manager/config"
|
|
)
|
|
|
|
func (r *configResultResolver) Plugins(ctx context.Context, obj *ConfigResult, include []string) (map[string]map[string]interface{}, error) {
|
|
if len(include) == 0 {
|
|
ret := config.GetInstance().GetAllPluginConfiguration()
|
|
return ret, nil
|
|
}
|
|
|
|
ret := make(map[string]map[string]interface{})
|
|
|
|
for _, plugin := range include {
|
|
c := config.GetInstance().GetPluginConfiguration(plugin)
|
|
if len(c) > 0 {
|
|
ret[plugin] = c
|
|
}
|
|
}
|
|
|
|
return ret, nil
|
|
}
|