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

@@ -700,10 +700,23 @@ func (e *Engine) RenderWorkflowLanding() gin.HandlerFunc {
scope := c.Param("id")
slug := c.Param("slug")
// Resolve scope to team_id
// Resolve scope to team_id (v0.31.2: supports team slug)
var teamID *string
if scope != "global" {
teamID = &scope
// UUID format check: 36 chars with dashes at standard positions
if len(scope) == 36 && scope[8] == '-' && scope[13] == '-' {
teamID = &scope
} else if e.stores.Teams != nil {
// Try team slug lookup
t, err := e.stores.Teams.GetBySlug(ctx, scope)
if err == nil && t != nil {
teamID = &t.ID
} else {
teamID = &scope // fall through — will 404 downstream
}
} else {
teamID = &scope
}
}
if e.stores.Workflows == nil {