From 5e7f6e86998c0dcdc8663db5df7370a050db1f6d Mon Sep 17 00:00:00 2001 From: Ryan McKinley Date: Mon, 6 Nov 2023 06:53:52 -0800 Subject: [PATCH] Snapshots: Do not return internal database ids (#77672) --- pkg/services/dashboardsnapshots/models.go | 6 +++--- public/api-enterprise-spec.json | 12 ------------ public/api-merged.json | 12 ------------ public/app/features/manage-dashboards/types.ts | 3 --- public/openapi3.json | 12 ------------ 5 files changed, 3 insertions(+), 42 deletions(-) diff --git a/pkg/services/dashboardsnapshots/models.go b/pkg/services/dashboardsnapshots/models.go index 00e5b4582e3..36c155b52ea 100644 --- a/pkg/services/dashboardsnapshots/models.go +++ b/pkg/services/dashboardsnapshots/models.go @@ -29,11 +29,11 @@ type DashboardSnapshot struct { // DashboardSnapshotDTO without dashboard map type DashboardSnapshotDTO struct { - ID int64 `json:"id" xorm:"id"` + ID int64 `json:"-" xorm:"id"` Name string `json:"name"` Key string `json:"key"` - OrgID int64 `json:"orgId" xorm:"org_id"` - UserID int64 `json:"userId" xorm:"user_id"` + OrgID int64 `json:"-" xorm:"org_id"` + UserID int64 `json:"-" xorm:"user_id"` External bool `json:"external"` ExternalURL string `json:"externalUrl" xorm:"external_url"` diff --git a/public/api-enterprise-spec.json b/public/api-enterprise-spec.json index cdf6ab57f58..d575e97116a 100644 --- a/public/api-enterprise-spec.json +++ b/public/api-enterprise-spec.json @@ -4046,27 +4046,15 @@ "externalUrl": { "type": "string" }, - "id": { - "type": "integer", - "format": "int64" - }, "key": { "type": "string" }, "name": { "type": "string" }, - "orgId": { - "type": "integer", - "format": "int64" - }, "updated": { "type": "string", "format": "date-time" - }, - "userId": { - "type": "integer", - "format": "int64" } } }, diff --git a/public/api-merged.json b/public/api-merged.json index 66dddbdf3c3..c3dd7a61e0b 100644 --- a/public/api-merged.json +++ b/public/api-merged.json @@ -13629,27 +13629,15 @@ "externalUrl": { "type": "string" }, - "id": { - "type": "integer", - "format": "int64" - }, "key": { "type": "string" }, "name": { "type": "string" }, - "orgId": { - "type": "integer", - "format": "int64" - }, "updated": { "type": "string", "format": "date-time" - }, - "userId": { - "type": "integer", - "format": "int64" } } }, diff --git a/public/app/features/manage-dashboards/types.ts b/public/app/features/manage-dashboards/types.ts index 48bd056afb7..a7f5a974920 100644 --- a/public/app/features/manage-dashboards/types.ts +++ b/public/app/features/manage-dashboards/types.ts @@ -7,13 +7,10 @@ export interface Snapshot { expires: string; external: boolean; externalUrl: string; - id: number; key: string; name: string; - orgId: number; updated: string; url?: string; - userId: number; } export type DeleteDashboardResponse = { diff --git a/public/openapi3.json b/public/openapi3.json index 64768646ea0..a379c2b1201 100644 --- a/public/openapi3.json +++ b/public/openapi3.json @@ -4542,27 +4542,15 @@ "externalUrl": { "type": "string" }, - "id": { - "format": "int64", - "type": "integer" - }, "key": { "type": "string" }, "name": { "type": "string" }, - "orgId": { - "format": "int64", - "type": "integer" - }, "updated": { "format": "date-time", "type": "string" - }, - "userId": { - "format": "int64", - "type": "integer" } }, "type": "object"