Skip to content

Commit

Permalink
updates func need use map[string]interface{}
Browse files Browse the repository at this point in the history
  • Loading branch information
hasa1K committed Jul 5, 2024
1 parent 061e660 commit dfe3f38
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions sqle/api/controller/v1/workflow.go
Original file line number Diff line number Diff line change
Expand Up @@ -891,7 +891,7 @@ func TerminateMultipleTaskByWorkflowV1(c echo.Context) error {
}

err = s.UpdateTaskStatusByIDs(terminatingTaskIDs,
map[string]string{"status": model.TaskStatusTerminating})
map[string]interface{}{"status": model.TaskStatusTerminating})

return c.JSON(http.StatusOK, controller.NewBaseReq(err))
}
Expand Down Expand Up @@ -955,7 +955,7 @@ func TerminateSingleTaskByWorkflowV1(c echo.Context) error {
}

err = s.UpdateTaskStatusByIDs([]uint{uint(taskID)},
map[string]string{"status": model.TaskStatusTerminating})
map[string]interface{}{"status": model.TaskStatusTerminating})

return c.JSON(http.StatusOK, controller.NewBaseReq(err))
}
Expand Down
2 changes: 1 addition & 1 deletion sqle/model/task.go
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ func (s *Storage) UpdateTaskStatusById(taskId uint, status string) error {
}

func updateTaskStatusById(tx *gorm.DB, taskId uint, status string) error {
return tx.Model(&Task{}).Where("id = ?", taskId).Updates(map[string]string{
return tx.Model(&Task{}).Where("id = ?", taskId).Updates(map[string]interface{}{
"status": status,
}).Error
}
Expand Down

0 comments on commit dfe3f38

Please sign in to comment.