mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 14:40:12 +01:00
Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
parent
a8f56e55e3
commit
957a928959
6 changed files with 82 additions and 19 deletions
|
|
@ -20,6 +20,7 @@ import (
|
|||
"net/http"
|
||||
|
||||
"github.com/88250/gulu"
|
||||
"github.com/emirpasic/gods/sets/hashset"
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/siyuan-note/siyuan/kernel/model"
|
||||
"github.com/siyuan-note/siyuan/kernel/util"
|
||||
|
|
@ -60,4 +61,16 @@ func setPetalEnabled(c *gin.Context) {
|
|||
}
|
||||
|
||||
ret.Data = data
|
||||
|
||||
var app string
|
||||
if nil != arg["app"] {
|
||||
app = arg["app"].(string)
|
||||
}
|
||||
if enabled {
|
||||
upsertPluginSet := hashset.New(packageName)
|
||||
model.PushReloadPlugin(upsertPluginSet, nil, app)
|
||||
} else {
|
||||
removePluginSet := hashset.New(packageName)
|
||||
model.PushReloadPlugin(nil, removePluginSet, app)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue