This commit is contained in:
1-6
2023-07-27 21:59:07 +08:00
parent 41c8fc7233
commit cdfce0a8b6
22 changed files with 90 additions and 71 deletions
+10 -11
View File
@@ -6,7 +6,6 @@ import (
"strings"
"github.com/cdle/sillyplus/core/common"
"github.com/cdle/sillyplus/core/storage"
"github.com/cdle/sillyplus/utils"
)
@@ -47,16 +46,16 @@ func pluginParse(script string, uuid string) (*common.Function, []func()) {
rule := strings.TrimSpace(res[2])
rule = parseReply3(rule, func(s1, s2 string) {
k := s1 + "." + s2
if _, ok := ks[k]; !ok {
cbs = append(cbs, func() {
storage.Watch(MakeBucket(s1), s2, func(old, new, key string) *storage.Final {
return &storage.Final{
EndFunc: func() {
plugins.Set(uuid, "reload")
},
}
}, uuid)
})
if _, ok := ks[k]; !ok { //已改成表单提交触发
// cbs = append(cbs, func() {
// storage.Watch(MakeBucket(s1), s2, func(old, new, key string) *storage.Final {
// return &storage.Final{
// EndFunc: func() {
// plugins.Set(uuid, "reload")
// },
// }
// }, uuid)
// })
ks[k] = true
}
})