mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
✨ 反链面板
This commit is contained in:
parent
8ae5858302
commit
f6411dba9a
4 changed files with 156 additions and 0 deletions
|
|
@ -38,6 +38,23 @@ func refreshBacklink(c *gin.Context) {
|
|||
model.RefreshBacklink(id)
|
||||
}
|
||||
|
||||
func getBacklinkDoc(c *gin.Context) {
|
||||
ret := gulu.Ret.NewResult()
|
||||
defer c.JSON(http.StatusOK, ret)
|
||||
|
||||
arg, ok := util.JsonArg(c, ret)
|
||||
if !ok {
|
||||
return
|
||||
}
|
||||
|
||||
defID := arg["defID"].(string)
|
||||
refTreeID := arg["refTreeID"].(string)
|
||||
blocks := model.GetBacklinkDoc(defID, refTreeID)
|
||||
ret.Data = map[string]interface{}{
|
||||
"blocks": blocks,
|
||||
}
|
||||
}
|
||||
|
||||
func getBacklink(c *gin.Context) {
|
||||
ret := gulu.Ret.NewResult()
|
||||
defer c.JSON(http.StatusOK, ret)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue