mirror of
https://github.com/wgh136/nysoure.git
synced 2025-12-16 15:51:14 +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