mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
[bugfix] Use ptr for instance stats entries to avoid skipping 0 values (#2666)
* [bugfix] Use ptr for instance stats entries to avoid skipping 0 values * comment explaining why stats values are pointers
This commit is contained in:
@@ -74,7 +74,9 @@ type InstanceV1 struct {
|
||||
// URLs of interest for client applications.
|
||||
URLs InstanceV1URLs `json:"urls,omitempty"`
|
||||
// Statistics about the instance: number of posts, accounts, etc.
|
||||
Stats map[string]int `json:"stats,omitempty"`
|
||||
// Values are pointers because we don't want to skip 0 values when
|
||||
// rendering stats via web templates.
|
||||
Stats map[string]*int `json:"stats,omitempty"`
|
||||
// URL of the instance avatar/banner image.
|
||||
// example: https://example.org/files/instance/thumbnail.jpeg
|
||||
Thumbnail string `json:"thumbnail"`
|
||||
|
Reference in New Issue
Block a user