🧑‍💻 Add an internal kernel API /api/ui/reloadTag https://github.com/siyuan-note/siyuan/issues/14594

This commit is contained in:
Daniel 2025-04-13 20:33:34 +08:00
parent 10d1735688
commit f25dcffa98
No known key found for this signature in database
GPG Key ID: 86211BA83DF03017
2 changed files with 8 additions and 0 deletions

View File

@ -477,4 +477,5 @@ func ServeAPI(ginServer *gin.Engine) {
ginServer.Handle("POST", "/api/ui/reloadAttributeView", model.CheckAuth, model.CheckAdminRole, model.CheckReadonly, reloadAttributeView)
ginServer.Handle("POST", "/api/ui/reloadProtyle", model.CheckAuth, model.CheckAdminRole, model.CheckReadonly, reloadProtyle)
ginServer.Handle("POST", "/api/ui/reloadFiletree", model.CheckAuth, model.CheckAdminRole, model.CheckReadonly, reloadFiletree)
ginServer.Handle("POST", "/api/ui/reloadTag", model.CheckAuth, model.CheckAdminRole, model.CheckReadonly, reloadTag)
}

View File

@ -25,6 +25,13 @@ import (
"github.com/siyuan-note/siyuan/kernel/util"
)
func reloadTag(c *gin.Context) {
ret := gulu.Ret.NewResult()
defer c.JSON(http.StatusOK, ret)
util.PushReloadTag()
}
func reloadFiletree(c *gin.Context) {
ret := gulu.Ret.NewResult()
defer c.JSON(http.StatusOK, ret)