mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-02-28 05:32:52 +00:00
🎨 云端收集箱文档内添加刷新按钮 https://github.com/siyuan-note/siyuan/issues/6306
This commit is contained in:
@@ -48,6 +48,25 @@ func removeShorthands(c *gin.Context) {
|
||||
}
|
||||
}
|
||||
|
||||
func getShorthand(c *gin.Context) {
|
||||
ret := gulu.Ret.NewResult()
|
||||
defer c.JSON(http.StatusOK, ret)
|
||||
|
||||
arg, ok := util.JsonArg(c, ret)
|
||||
if !ok {
|
||||
return
|
||||
}
|
||||
|
||||
id := arg["id"].(string)
|
||||
data, err := model.GetCloudShorthand(id)
|
||||
if nil != err {
|
||||
ret.Code = 1
|
||||
ret.Msg = err.Error()
|
||||
return
|
||||
}
|
||||
ret.Data = data
|
||||
}
|
||||
|
||||
func getShorthands(c *gin.Context) {
|
||||
ret := gulu.Ret.NewResult()
|
||||
defer c.JSON(http.StatusOK, ret)
|
||||
|
||||
@@ -182,6 +182,7 @@ func ServeAPI(ginServer *gin.Engine) {
|
||||
ginServer.Handle("POST", "/api/sync/getBootSync", model.CheckAuth, getBootSync)
|
||||
|
||||
ginServer.Handle("POST", "/api/inbox/getShorthands", model.CheckAuth, getShorthands)
|
||||
ginServer.Handle("POST", "/api/inbox/getShorthand", model.CheckAuth, getShorthand)
|
||||
ginServer.Handle("POST", "/api/inbox/removeShorthands", model.CheckAuth, removeShorthands)
|
||||
|
||||
ginServer.Handle("POST", "/api/extension/copy", model.CheckAuth, extensionCopy)
|
||||
|
||||
Reference in New Issue
Block a user