This commit is contained in:
Daniel 2025-07-24 12:09:43 +08:00
parent bfc0daf6e5
commit 9480403d2f
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -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
} }