反链面板

This commit is contained in:
Liang Ding 2022-09-29 12:11:52 +08:00
parent 8ae5858302
commit f6411dba9a
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
4 changed files with 156 additions and 0 deletions

View file

@ -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)