mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-23 18:10:12 +01:00
🎨 Database grouping by field https://github.com/siyuan-note/siyuan/issues/10964
This commit is contained in:
parent
bfc0daf6e5
commit
9480403d2f
1 changed files with 5 additions and 2 deletions
|
|
@ -59,10 +59,9 @@ func batchReplaceAttributeViewBlocks(c *gin.Context) {
|
||||||
|
|
||||||
func setAttrViewGroup(c *gin.Context) {
|
func setAttrViewGroup(c *gin.Context) {
|
||||||
ret := gulu.Ret.NewResult()
|
ret := gulu.Ret.NewResult()
|
||||||
defer c.JSON(http.StatusOK, ret)
|
|
||||||
|
|
||||||
arg, ok := util.JsonArg(c, ret)
|
arg, ok := util.JsonArg(c, ret)
|
||||||
if !ok {
|
if !ok {
|
||||||
|
c.JSON(http.StatusOK, ret)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -74,12 +73,14 @@ func setAttrViewGroup(c *gin.Context) {
|
||||||
if nil != err {
|
if nil != err {
|
||||||
ret.Code = -1
|
ret.Code = -1
|
||||||
ret.Msg = err.Error()
|
ret.Msg = err.Error()
|
||||||
|
c.JSON(http.StatusOK, ret)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
group := &av.ViewGroup{}
|
group := &av.ViewGroup{}
|
||||||
if err = gulu.JSON.UnmarshalJSON(data, group); nil != err {
|
if err = gulu.JSON.UnmarshalJSON(data, group); nil != err {
|
||||||
ret.Code = -1
|
ret.Code = -1
|
||||||
ret.Msg = err.Error()
|
ret.Msg = err.Error()
|
||||||
|
c.JSON(http.StatusOK, ret)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -87,6 +88,8 @@ func setAttrViewGroup(c *gin.Context) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
ret.Code = -1
|
ret.Code = -1
|
||||||
ret.Msg = err.Error()
|
ret.Msg = err.Error()
|
||||||
|
|
||||||
|
c.JSON(http.StatusOK, ret)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue