Skip to content
This repository was archived by the owner on Nov 24, 2024. It is now read-only.

Commit

Permalink
fix: adjust warning definitions within templates
Browse files Browse the repository at this point in the history
  • Loading branch information
bill-ezhao committed Jun 27, 2024
1 parent 7f23829 commit 6c56b43
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion sdk/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ type Template struct {
Generation string `json:"generation,omitempty"`
UpdatedAt string `json:"updated_at,omitempty"` //nolint:tagliatelle
Versions []TemplateVersion `json:"versions,omitempty"`
Warnings []string `json:"warnings,omitempty"`
Warning Warning `json:"warning,omitempty"`
}

type Templates struct {
Expand Down
6 changes: 5 additions & 1 deletion sdk/template_version.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ type TemplateVersion struct {
TemplateID string `json:"template_id,omitempty"` //nolint:tagliatelle
UpdatedAt string `json:"updated_at,omitempty"` //nolint:tagliatelle
ThumbnailURL string `json:"thumbnail_url,omitempty"` //nolint:tagliatelle
Warnings []string `json:"warnings,omitempty"`
Warning Warning `json:"warning,omitempty"`
Active int `json:"active,omitempty"`
Name string `json:"name,omitempty"`
HTMLContent string `json:"html_content,omitempty"` //nolint:tagliatelle
Expand All @@ -23,6 +23,10 @@ type TemplateVersion struct {
TestData string `json:"test_data,omitempty"` //nolint:tagliatelle
}

type Warning struct {
Message string `json:"message,omitempty"`
}

func parseTemplateVersion(respBody string) (*TemplateVersion, error) {
var body TemplateVersion

Expand Down

0 comments on commit 6c56b43

Please sign in to comment.