From 8d5ccc7831361bf6159a9850d1bd967d8c1a073e Mon Sep 17 00:00:00 2001 From: Johannes Schill Date: Thu, 28 Feb 2019 10:35:53 +0100 Subject: [PATCH] fix: Return url when query dashboards by tag --- pkg/api/playlist_play.go | 2 ++ pkg/services/search/models.go | 1 + 2 files changed, 3 insertions(+) diff --git a/pkg/api/playlist_play.go b/pkg/api/playlist_play.go index 5ca136c32c4..2757f245060 100644 --- a/pkg/api/playlist_play.go +++ b/pkg/api/playlist_play.go @@ -52,8 +52,10 @@ func populateDashboardsByTag(orgID int64, signedInUser *m.SignedInUser, dashboar for _, item := range searchQuery.Result { result = append(result, dtos.PlaylistDashboard{ Id: item.Id, + Slug: item.Slug, Title: item.Title, Uri: item.Uri, + Url: m.GetDashboardUrl(item.Uid, item.Slug), Order: dashboardTagOrder[tag], }) } diff --git a/pkg/services/search/models.go b/pkg/services/search/models.go index 2da09672f13..475cb4a3777 100644 --- a/pkg/services/search/models.go +++ b/pkg/services/search/models.go @@ -17,6 +17,7 @@ type Hit struct { Title string `json:"title"` Uri string `json:"uri"` Url string `json:"url"` + Slug string `json:"slug"` Type HitType `json:"type"` Tags []string `json:"tags"` IsStarred bool `json:"isStarred"`