kanban dashboard refactor
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user