@@ -535,6 +535,7 @@ func (rc *shopItemController) DeleteItemHandler(c *gin.Context) {
|
||||
|
||||
func (rc *shopItemController) TagHandler(ctx *gin.Context) {
|
||||
name := ctx.PostForm("name")
|
||||
color := ctx.PostForm("color")
|
||||
action := ctx.PostForm("action")
|
||||
|
||||
tag, err := repositories.Tags.GetById(ctx.Param("id"))
|
||||
@@ -547,6 +548,7 @@ func (rc *shopItemController) TagHandler(ctx *gin.Context) {
|
||||
|
||||
if action == "update" {
|
||||
tag.Name = name
|
||||
tag.Color = color
|
||||
tag, err = repositories.Tags.Update(tag)
|
||||
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user