Changeset 0.31.2 (#205)
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user