Files
tm_back/internal/kanban/context.go
T
2026-05-27 22:06:23 +03:30

15 lines
393 B
Go

package kanban
import "github.com/labstack/echo/v4"
// ownerIDFromContext returns the board owner ID from admin (user_id) or mobile (customer_id) auth.
func ownerIDFromContext(c echo.Context) (string, bool) {
if id, ok := c.Get("customer_id").(string); ok && id != "" {
return id, true
}
if id, ok := c.Get("user_id").(string); ok && id != "" {
return id, true
}
return "", false
}