backend/dashboardsnapshot service: move models (#50898)

* backend/dashboard snapshots: refactor leftover models and mocks
* Move all dashboard snapshot-related models into the dashboardsnapshotservice package
* Remove leftover dashboard-related mocks from the mockstore
This commit is contained in:
Kristin Laemmert
2022-06-17 09:09:01 -04:00
committed by GitHub
parent c6ab87008a
commit 72f934de01
13 changed files with 196 additions and 133 deletions

View File

@ -1,7 +1,7 @@
package definitions
import (
"github.com/grafana/grafana/pkg/models"
"github.com/grafana/grafana/pkg/services/dashboardsnapshots"
)
// swagger:route POST /snapshots snapshots createSnapshot
@ -68,7 +68,7 @@ import (
type CreateSnapshotParams struct {
// in:body
// required:true
Body models.CreateDashboardSnapshotCommand `json:"body"`
Body dashboardsnapshots.CreateDashboardSnapshotCommand `json:"body"`
}
// swagger:parameters getSnapshots
@ -118,7 +118,7 @@ type CreateSnapshotResponse struct {
// swagger:response getSnapshotsResponse
type GetSnapshotsResponse struct {
// in:body
Body []*models.DashboardSnapshotDTO `json:"body"`
Body []*dashboardsnapshots.DashboardSnapshotDTO `json:"body"`
}
// swagger:response snapshotResponse