1
0
Fork 0

Added omitempty, possibly fixes #57

This commit is contained in:
マリウス 2024-02-20 10:49:58 -05:00
parent 4cd77b1239
commit 408cbd252a
No known key found for this signature in database
GPG Key ID: 272ED814BF63261F
1 changed files with 13 additions and 13 deletions

View File

@ -25,21 +25,21 @@ type CategoryModel struct {
TopicCount int `json:"topic_count"` TopicCount int `json:"topic_count"`
PostCount int `json:"post_count"` PostCount int `json:"post_count"`
Position int `json:"position"` Position int `json:"position"`
Description string `json:"description"` Description string `json:"description",omitempty`
DescriptionText string `json:"description_text"` DescriptionText string `json:"description_text",omitempty`
DescriptionExcerpt string `json:"description_excerpt"` DescriptionExcerpt string `json:"description_excerpt",omitempty`
TopicUrl string `json:"topic_url"` TopicUrl string `json:"topic_url",omitempty`
ReadRestricted bool `json:"read_restricted"` ReadRestricted bool `json:"read_restricted"`
Permission int `json:"permission"` Permission int `json:"permission",omitempty`
NotificationLevel int `json:"notification_level"` NotificationLevel int `json:"notification_level"`
CanEdit bool `json:"can_edit"` CanEdit bool `json:"can_edit"`
TopicTemplate string `json:"topic_template"` TopicTemplate string `json:"topic_template",omitempty`
HasChildren bool `json:"has_children"` HasChildren bool `json:"has_children",omitempty`
SortOrder string `json:"sort_order"` SortOrder string `json:"sort_order",omitempty`
SortAscending bool `json:"sort_ascending"` SortAscending bool `json:"sort_ascending",omitempty`
ShowSubcategoryList bool `json:"show_subcategory_list"` ShowSubcategoryList bool `json:"show_subcategory_list"`
NumFeaturedTopics int `json:"num_featured_topics"` NumFeaturedTopics int `json:"num_featured_topics"`
DefaultView string `json:"default_view"` DefaultView string `json:"default_view",omitempty`
SubcategoryListStyle string `json:"subcategory_list_style"` SubcategoryListStyle string `json:"subcategory_list_style"`
DefaultTopPeriod string `json:"default_top_period"` DefaultTopPeriod string `json:"default_top_period"`
DefaultListFilter string `json:"default_list_filter"` DefaultListFilter string `json:"default_list_filter"`
@ -53,9 +53,9 @@ type CategoryModel struct {
IsUncategorized bool `json:"is_uncategorized"` IsUncategorized bool `json:"is_uncategorized"`
SubcategoryIDs []int `json:"subcategory_ids"` SubcategoryIDs []int `json:"subcategory_ids"`
SubcategoryList []CategoryModel `json:"subcategory_list"` SubcategoryList []CategoryModel `json:"subcategory_list"`
UploadedLogo string `json:"uploaded_logo"` UploadedLogo string `json:"uploaded_logo",omitempty`
UploadedLogoDark string `json:"uploaded_logo_dark"` UploadedLogoDark string `json:"uploaded_logo_dark",omitempty`
UploadedBackground string `json:"uploaded_background"` UploadedBackground string `json:"uploaded_background",omitempty`
} }
type CategoriesService interface { type CategoriesService interface {