chore(dashboard version service): make method sigs more consistent (#60736)
The DashboardVersion struct is the database object; the DashboardVersionDTO is the object that should be sent to the API layer. In the future I'd like to move DashboardVersion to dashverimpl and un-export it, but there are a few places that Insert directly into that table, not all of which are test fixtures, so that should wait until we clean up at least the DashboardService's use of it.
This commit is contained in:
@@ -59,16 +59,15 @@ func (ss *sqlxStore) DeleteBatch(ctx context.Context, cmd *dashver.DeleteExpired
|
||||
return deleted, err
|
||||
}
|
||||
|
||||
func (ss *sqlxStore) List(ctx context.Context, query *dashver.ListDashboardVersionsQuery) ([]*dashver.DashboardVersionDTO, error) {
|
||||
var dashboardVersion []*dashver.DashboardVersionDTO
|
||||
func (ss *sqlxStore) List(ctx context.Context, query *dashver.ListDashboardVersionsQuery) ([]*dashver.DashboardVersion, error) {
|
||||
var dashboardVersion []*dashver.DashboardVersion
|
||||
qr := `SELECT dashboard_version.id,
|
||||
dashboard_version.dashboard_id,
|
||||
dashboard_version.parent_version,
|
||||
dashboard_version.restored_from,
|
||||
dashboard_version.version,
|
||||
dashboard_version.created,
|
||||
dashboard_version.message,
|
||||
"user".login as created_by_login
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user