🎨 Add a kernel API /api/system/getWorkspaceInfo https://github.com/siyuan-note/siyuan/issues/13300

This commit is contained in:
Daniel 2024-11-29 10:56:32 +08:00
parent cc629041f9
commit 691290a7be
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
3 changed files with 11 additions and 1 deletions

View file

@ -35,6 +35,15 @@ import (
"github.com/siyuan-note/siyuan/kernel/util"
)
func getWorkspaceInfo(c *gin.Context) {
ret := gulu.Ret.NewResult()
defer c.JSON(http.StatusOK, ret)
ret.Data = map[string]any{
"workspaceDir": util.WorkspaceDir,
}
}
func getNetwork(c *gin.Context) {
ret := gulu.Ret.NewResult()
defer c.JSON(http.StatusOK, ret)