update
This commit is contained in:
1 parent
0690285147
commit
5618cd2738
154 files changed
+5021
-3161
No files matched your search
@@ -53,8 +53,12 @@ func (h *PipelineHandler) UpdateGroup(c *gin.Context) {
|
||||
}
|
||||
c.ShouldBindJSON(&req)
|
||||
updates := map[string]interface{}{}
|
||||
if req.Name != nil { updates["name"] = *req.Name }
|
||||
if req.Description != nil { updates["description"] = *req.Description }
|
||||
if req.Name != nil {
|
||||
updates["name"] = *req.Name
|
||||
}
|
||||
if req.Description != nil {
|
||||
updates["description"] = *req.Description
|
||||
}
|
||||
h.db.Model(&group).Updates(updates)
|
||||
h.db.First(&group, id)
|
||||
c.JSON(http.StatusOK, model.Response{Code: 200, Data: group})
|
||||
|
||||
Reference in new issue
Block a user