This commit is contained in:
Daniel 2024-12-30 15:52:26 +08:00
parent c1c4972544
commit f2584745f5
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -337,7 +337,10 @@ func getContentWordCount(c *gin.Context) {
} }
content := arg["content"].(string) 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) { func getBlocksWordCount(c *gin.Context) {
@ -354,7 +357,10 @@ func getBlocksWordCount(c *gin.Context) {
for _, id := range idsArg { for _, id := range idsArg {
ids = append(ids, id.(string)) 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) { func getTreeStat(c *gin.Context) {
@ -367,7 +373,10 @@ func getTreeStat(c *gin.Context) {
} }
id := arg["id"].(string) 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) { func getDOMText(c *gin.Context) {