Merge pull request #298 from trheyi/main

[add] dashboard widget guard
This commit is contained in:
Max 2022-12-19 19:27:10 +08:00 committed by GitHub
commit d2ca46f8d9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -8,6 +8,7 @@ import (
table_v0 "github.com/yaoapp/yao/table" table_v0 "github.com/yaoapp/yao/table"
"github.com/yaoapp/yao/widgets/chart" "github.com/yaoapp/yao/widgets/chart"
"github.com/yaoapp/yao/widgets/dashboard"
"github.com/yaoapp/yao/widgets/form" "github.com/yaoapp/yao/widgets/form"
"github.com/yaoapp/yao/widgets/list" "github.com/yaoapp/yao/widgets/list"
"github.com/yaoapp/yao/widgets/table" "github.com/yaoapp/yao/widgets/table"
@ -22,6 +23,7 @@ var Guards = map[string]gin.HandlerFunc{
"widget-list": list.Guard, // Widget List Guard "widget-list": list.Guard, // Widget List Guard
"widget-form": form.Guard, // Widget Form Guard "widget-form": form.Guard, // Widget Form Guard
"widget-chart": chart.Guard, // Widget Chart Guard "widget-chart": chart.Guard, // Widget Chart Guard
"widget-dashboard": dashboard.Guard, // Widget Dashboard Guard
} }
// JWT Bearer JWT // JWT Bearer JWT