This commit is contained in:
1-6
2023-07-26 23:11:24 +08:00
parent 90494264d9
commit 63365c1506
12 changed files with 81 additions and 38 deletions
+2 -6
View File
@@ -76,15 +76,11 @@ func initWeb() {
for _, f := range Functions {
if f.UUID == uuid && f.Public {
plugin_downloads.Set(f.UUID, plugin_downloads.GetInt(f.UUID)+1)
if f.Type == "goja" {
if !isNameUuid(f.UUID) {
c.String(200, publicScript(plugins.GetString(f.UUID)))
return
} else {
v, ok := plugins_id.Load(f.UUID)
if !ok {
return
}
dir := filepath.Dir(v.(string))
dir := filepath.Dir(f.Path)
if _, err := os.Stat(dir); err != nil { //执行压缩
return
}