Commit 90207bcb by bergquist

register handler for get dashboards by slug

parent fcd86fb2
......@@ -23,6 +23,7 @@ func init() {
bus.AddHandler("sql", GetDashboardsByPluginId)
bus.AddHandler("sql", GetFoldersForSignedInUser)
bus.AddHandler("sql", GetDashboardPermissionsForUser)
bus.AddHandler("sql", GetDashboardsBySlug)
}
var generateNewUid func() string = util.GenerateShortUid
......@@ -554,7 +555,7 @@ func GetDashboardSlugById(query *m.GetDashboardSlugByIdQuery) error {
}
func GetDashboardsBySlug(query *m.GetDashboardsBySlugQuery) error {
var dashboards = make([]*m.Dashboard, 0)
var dashboards []*m.Dashboard
if err := x.Where("org_id=? AND slug=?", query.OrgId, query.Slug).Find(&dashboards); err != nil {
return err
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment