mirror of
https://github.com/wgh136/nysoure.git
synced 2025-09-27 12:17:24 +00:00
Add tags page.
This commit is contained in:
@@ -33,3 +33,15 @@ func (t *Tag) ToView() *TagView {
|
||||
Aliases: aliases,
|
||||
}
|
||||
}
|
||||
|
||||
type TagViewWithCount struct {
|
||||
TagView
|
||||
ResourceCount int `json:"resources_count"` // Count of resources associated with the tag
|
||||
}
|
||||
|
||||
func (t *TagView) WithCount(count int) *TagViewWithCount {
|
||||
return &TagViewWithCount{
|
||||
TagView: *t,
|
||||
ResourceCount: count,
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user