chore(dashboard version service): remove user table join from store implementations (#60779)

chore (dashboardversion service): remove (one) join from store implementations

We return the userID from the dashboardservice store; the service (or api) layer can use that to get the user's login when needed.
This commit is contained in:
Kristin Laemmert
2022-12-28 07:59:10 -05:00
committed by GitHub
parent 6e9419ea80
commit b356526ebe
3 changed files with 13 additions and 8 deletions
@@ -67,9 +67,9 @@ func (ss *sqlxStore) List(ctx context.Context, query *dashver.ListDashboardVersi
dashboard_version.restored_from,
dashboard_version.version,
dashboard_version.created,
dashboard_version.created_by,
dashboard_version.message
FROM dashboard_version
LEFT JOIN "user" ON "user".id = dashboard_version.created_by
LEFT JOIN dashboard ON dashboard.id = dashboard_version.dashboard_id
WHERE dashboard_version.dashboard_id=? AND dashboard.org_id=?
ORDER BY dashboard_version.version DESC