mirror of
https://github.com/langhuihui/monibuca.git
synced 2025-12-24 13:48:04 +08:00
fix: all config plugin name to lowcase
This commit is contained in:
@@ -143,10 +143,10 @@ func (s *Server) api_Config_YAML_All(rw http.ResponseWriter, r *http.Request) {
|
|||||||
|
|
||||||
// 3. Process plugin configs.
|
// 3. Process plugin configs.
|
||||||
for _, meta := range plugins {
|
for _, meta := range plugins {
|
||||||
if filterName != "" && meta.Name != filterName {
|
if filterName != "" && !strings.EqualFold(meta.Name, filterName) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
name := strings.ToLower(meta.Name)
|
||||||
configType := meta.Type
|
configType := meta.Type
|
||||||
if configType.Kind() == reflect.Ptr {
|
if configType.Kind() == reflect.Ptr {
|
||||||
configType = configType.Elem()
|
configType = configType.Elem()
|
||||||
@@ -168,12 +168,12 @@ func (s *Server) api_Config_YAML_All(rw http.ResponseWriter, r *http.Request) {
|
|||||||
configSections = append(configSections, struct {
|
configSections = append(configSections, struct {
|
||||||
name string
|
name string
|
||||||
data any
|
data any
|
||||||
}{meta.Name, mergedConf})
|
}{name, mergedConf})
|
||||||
} else {
|
} else {
|
||||||
configSections = append(configSections, struct {
|
configSections = append(configSections, struct {
|
||||||
name string
|
name string
|
||||||
data any
|
data any
|
||||||
}{meta.Name, pluginConf})
|
}{name, pluginConf})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user