mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-23 10:00:13 +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) {
|
||||
ret := gulu.Ret.NewResult()
|
||||
defer c.JSON(http.StatusOK, ret)
|
||||
|
||||
arg, ok := util.JsonArg(c, ret)
|
||||
if !ok {
|
||||
c.JSON(http.StatusOK, ret)
|
||||
return
|
||||
}
|
||||
|
||||
|
|
@ -74,12 +73,14 @@ func setAttrViewGroup(c *gin.Context) {
|
|||
if nil != err {
|
||||
ret.Code = -1
|
||||
ret.Msg = err.Error()
|
||||
c.JSON(http.StatusOK, ret)
|
||||
return
|
||||
}
|
||||
group := &av.ViewGroup{}
|
||||
if err = gulu.JSON.UnmarshalJSON(data, group); nil != err {
|
||||
ret.Code = -1
|
||||
ret.Msg = err.Error()
|
||||
c.JSON(http.StatusOK, ret)
|
||||
return
|
||||
}
|
||||
|
||||
|
|
@ -87,6 +88,8 @@ func setAttrViewGroup(c *gin.Context) {
|
|||
if err != nil {
|
||||
ret.Code = -1
|
||||
ret.Msg = err.Error()
|
||||
|
||||
c.JSON(http.StatusOK, ret)
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue