Browse Source

fix(api): do not include null jsonData field in /api/datasources resource, closes #3755

Torkel Ödegaard 10 năm trước cách đây
mục cha
commit
38ddc88b20
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      pkg/api/dtos/models.go

+ 1 - 1
pkg/api/dtos/models.go

@@ -64,7 +64,7 @@ type DataSource struct {
 	BasicAuthPassword string                 `json:"basicAuthPassword"`
 	BasicAuthPassword string                 `json:"basicAuthPassword"`
 	WithCredentials   bool                   `json:"withCredentials"`
 	WithCredentials   bool                   `json:"withCredentials"`
 	IsDefault         bool                   `json:"isDefault"`
 	IsDefault         bool                   `json:"isDefault"`
-	JsonData          map[string]interface{} `json:"jsonData"`
+	JsonData          map[string]interface{} `json:"jsonData,omitempty"`
 }
 }
 
 
 type MetricQueryResultDto struct {
 type MetricQueryResultDto struct {