Skip to content

Commit

Permalink
Add feedback api feature flag to models
Browse files Browse the repository at this point in the history
  • Loading branch information
dhee-tree committed Jan 31, 2025
1 parent 0226e13 commit 7a59252
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 2 deletions.
2 changes: 2 additions & 0 deletions model/census/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ type DatasetLandingPage struct {
IsMultivariate bool `json:"is_multivariate"`
ShowXLSXInfo bool `json:"show_xlsx_info"`
OSRLogo osrlogo.OSRLogo `json:"osr_logo"`
EnableFeedbackAPI bool `json:"enable_feedback_api"`
FeedbackAPIURL string `json:"feedback_api_url"`
ImproveResults model.Collapsible
}

Expand Down
2 changes: 2 additions & 0 deletions model/custom/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ type Page struct {
CreateCustomDatasetPage CreateCustomDatasetPage `json:"data"`
IsNationalStatistic bool `json:"is_national_statistic"`
ShowCensusBranding bool `json:"show_census_branding"`
EnableFeedbackAPI bool `json:"enable_feedback_api"`
FeedbackAPIURL string `json:"feedback_api_url"`
}

// CreateDatasetPage contains properties related to the create dataset page
Expand Down
2 changes: 2 additions & 0 deletions model/dataset/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ type DatasetPage struct { //nolint:revive //renaming to page would mix types and
Edition string `json:"edition"`
Markdown string `json:"markdown"`
ParentPath string `json:"parent_path"`
EnableFeedbackAPI bool `json:"enable_feedback_api"`
FeedbackAPIURL string `json:"feedback_api_url"`
}

// Download has the details for an individual dataset's downloadable files
Expand Down
2 changes: 2 additions & 0 deletions model/static/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ type DatasetLandingPage struct {
Notices []Message `json:"notices"`
ParentPath string `json:"parent_path"`
OSRLogo osrlogo.OSRLogo `json:"osr_logo"`
EnableFeedbackAPI bool `json:"enable_feedback_api"`
FeedbackAPIURL string `json:"feedback_api_url"`
}

// Related content (split by type) to this page
Expand Down
6 changes: 4 additions & 2 deletions model/version/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@ type Page struct {

// VersionsList represents the data on the versions list page
type VersionsList struct {
LatestVersionURL string `json:"latest_version_url"`
Versions []sharedModel.Version `json:"versions"`
LatestVersionURL string `json:"latest_version_url"`
Versions []sharedModel.Version `json:"versions"`
EnableFeedbackAPI bool `json:"enable_feedback_api"`
FeedbackAPIURL string `json:"feedback_api_url"`
}

// Download has the details for the an individual dataset's downloadable files
Expand Down

0 comments on commit 7a59252

Please sign in to comment.