mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 15:10:12 +01:00
🎨 Improve content stat https://github.com/siyuan-note/siyuan/issues/13627
This commit is contained in:
parent
c1c4972544
commit
f2584745f5
1 changed files with 12 additions and 3 deletions
|
|
@ -337,7 +337,10 @@ func getContentWordCount(c *gin.Context) {
|
|||
}
|
||||
|
||||
content := arg["content"].(string)
|
||||
ret.Data = filesys.ContentStat(content)
|
||||
ret.Data = map[string]any{
|
||||
"reqId": arg["reqId"],
|
||||
"stat": filesys.ContentStat(content),
|
||||
}
|
||||
}
|
||||
|
||||
func getBlocksWordCount(c *gin.Context) {
|
||||
|
|
@ -354,7 +357,10 @@ func getBlocksWordCount(c *gin.Context) {
|
|||
for _, id := range idsArg {
|
||||
ids = append(ids, id.(string))
|
||||
}
|
||||
ret.Data = filesys.BlocksWordCount(ids)
|
||||
ret.Data = map[string]any{
|
||||
"reqId": arg["reqId"],
|
||||
"stat": filesys.BlocksWordCount(ids),
|
||||
}
|
||||
}
|
||||
|
||||
func getTreeStat(c *gin.Context) {
|
||||
|
|
@ -367,7 +373,10 @@ func getTreeStat(c *gin.Context) {
|
|||
}
|
||||
|
||||
id := arg["id"].(string)
|
||||
ret.Data = filesys.StatTree(id)
|
||||
ret.Data = map[string]any{
|
||||
"reqId": arg["reqId"],
|
||||
"stat": filesys.StatTree(id),
|
||||
}
|
||||
}
|
||||
|
||||
func getDOMText(c *gin.Context) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue