mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-29 19:42:25 -05:00
[feature] Add local user and post count to nodeinfo responses (#1325)
* Add local user and post count to nodeinfo responses This fixes #1307 (at least partially). The nodeinfo endpoint should now return the total users on an instance, along with their post count. * Update NodeInfoUsers docstring and swagger yaml file
This commit is contained in:
parent
d6487933c7
commit
3512325e46
3 changed files with 31 additions and 5 deletions
|
|
@ -79,8 +79,11 @@ type NodeInfoServices struct {
|
|||
|
||||
// NodeInfoUsage represents usage information about this server, such as number of users.
|
||||
type NodeInfoUsage struct {
|
||||
Users NodeInfoUsers `json:"users"`
|
||||
Users NodeInfoUsers `json:"users"`
|
||||
LocalPosts int `json:"localPosts"`
|
||||
}
|
||||
|
||||
// NodeInfoUsers is a stub for usage information, currently empty.
|
||||
type NodeInfoUsers struct{}
|
||||
// NodeInfoUsers represents aggregate information about the users on the server.
|
||||
type NodeInfoUsers struct {
|
||||
Total int `json:"total"`
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue