func()

in cmd/controller/workflow.go [52:63]


func (c *WorkflowController) Save(ctx *gin.Context) {
	request := SaveWorkflowRequest{}
	if err := ctx.ShouldBind(&request); err != nil {
		ctx.JSON(http.StatusBadRequest, err.Error())
		return
	}
	if err := c.workflowDAL.Save(ctx, &request.Workflow); err != nil {
		ctx.JSON(http.StatusInternalServerError, err.Error())
		return
	}
	ctx.JSON(http.StatusOK, nil)
}