Changeset 0.32.0 (#206)
This commit is contained in:
@@ -25,8 +25,8 @@ import (
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
|
||||
"git.gobha.me/xcaliber/chat-switchboard/config"
|
||||
"git.gobha.me/xcaliber/chat-switchboard/store"
|
||||
"chat-switchboard/config"
|
||||
"chat-switchboard/store"
|
||||
)
|
||||
|
||||
//go:embed templates/*.html templates/components/*.html templates/surfaces/*.html templates/admin/*.html
|
||||
@@ -700,23 +700,10 @@ func (e *Engine) RenderWorkflowLanding() gin.HandlerFunc {
|
||||
scope := c.Param("id")
|
||||
slug := c.Param("slug")
|
||||
|
||||
// Resolve scope to team_id (v0.31.2: supports team slug)
|
||||
// Resolve scope to team_id
|
||||
var teamID *string
|
||||
if scope != "global" {
|
||||
// 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
|
||||
}
|
||||
teamID = &scope
|
||||
}
|
||||
|
||||
if e.stores.Workflows == nil {
|
||||
|
||||
Reference in New Issue
Block a user