🎨 Attribute Panel - Database attributes custom sorting https://github.com/siyuan-note/siyuan/issues/11428

This commit is contained in:
Daniel 2024-05-16 22:24:15 +08:00
parent 0f6a280513
commit 2058f9a0c0
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
5 changed files with 90 additions and 17 deletions

View file

@ -211,7 +211,7 @@ func removeAttributeViewKey(c *gin.Context) {
util.PushReloadAttrView(avID)
}
func sortAttributeViewKey(c *gin.Context) {
func sortAttributeViewViewKey(c *gin.Context) {
ret := gulu.Ret.NewResult()
defer c.JSON(http.StatusOK, ret)
@ -228,7 +228,30 @@ func sortAttributeViewKey(c *gin.Context) {
keyID := arg["keyID"].(string)
previousKeyID := arg["previousKeyID"].(string)
err := model.SortAttributeViewKey(avID, viewID, keyID, previousKeyID)
err := model.SortAttributeViewViewKey(avID, viewID, keyID, previousKeyID)
if nil != err {
ret.Code = -1
ret.Msg = err.Error()
return
}
util.PushReloadAttrView(avID)
}
func sortAttributeViewKey(c *gin.Context) {
ret := gulu.Ret.NewResult()
defer c.JSON(http.StatusOK, ret)
arg, ok := util.JsonArg(c, ret)
if !ok {
return
}
avID := arg["avID"].(string)
keyID := arg["keyID"].(string)
previousKeyID := arg["previousKeyID"].(string)
err := model.SortAttributeViewKey(avID, keyID, previousKeyID)
if nil != err {
ret.Code = -1
ret.Msg = err.Error()