This commit is contained in:
Liang Ding 2022-10-01 16:01:34 +08:00
parent 66f27afcc2
commit fd01ab84e2
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
2 changed files with 18 additions and 0 deletions

View file

@ -38,6 +38,23 @@ func refreshBacklink(c *gin.Context) {
model.RefreshBacklink(id)
}
func getBackmentionDoc(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)
keyword := ""
backlinks := model.GetBackmentionDoc(defID, keyword)
ret.Data = map[string]interface{}{
"backmentions": backlinks,
}
}
func getBacklinkDoc(c *gin.Context) {
ret := gulu.Ret.NewResult()
defer c.JSON(http.StatusOK, ret)