Changeset 0.31.2 (#205)

This commit is contained in:
2026-03-19 13:29:27 +00:00
parent 8364440081
commit 6668e546fe
25 changed files with 1357 additions and 50 deletions

View File

@@ -106,6 +106,12 @@ func (h *WorkflowHandler) Create(c *gin.Context) {
w.CreatedBy = c.GetString("user_id")
// v0.31.2: Team-scoped workflow creation (set by CreateTeamWorkflow)
if forceTeam, ok := c.Get("force_team_id"); ok {
teamID := forceTeam.(string)
w.TeamID = &teamID
}
if err := h.stores.Workflows.Create(c.Request.Context(), &w); err != nil {
if strings.Contains(err.Error(), "unique") || strings.Contains(err.Error(), "UNIQUE") {
c.JSON(http.StatusConflict, gin.H{"error": "slug already exists in this scope"})