Changeset 0.32.0 (#206)
This commit is contained in:
@@ -10,8 +10,8 @@ import (
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
|
||||
"git.gobha.me/xcaliber/chat-switchboard/models"
|
||||
"git.gobha.me/xcaliber/chat-switchboard/store"
|
||||
"chat-switchboard/models"
|
||||
"chat-switchboard/store"
|
||||
)
|
||||
|
||||
// ── Workflow Handler ────────────────────────
|
||||
@@ -106,10 +106,10 @@ 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
|
||||
// v0.31.2: team-scoped route injects force_team_id via CreateTeamWorkflow
|
||||
if ftid, ok := c.Get("force_team_id"); ok {
|
||||
tid := ftid.(string)
|
||||
w.TeamID = &tid
|
||||
}
|
||||
|
||||
if err := h.stores.Workflows.Create(c.Request.Context(), &w); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user