Snapshots: Do not return internal database ids (#77672)

This commit is contained in:
Ryan McKinley 2023-11-06 06:53:52 -08:00 committed by GitHub
parent bc7c7bec16
commit 5e7f6e8699
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 3 additions and 42 deletions

View File

@ -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"`

View File

@ -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"
}
}
},

View File

@ -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"
}
}
},

View File

@ -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 = {

View File

@ -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"