diff options
author | 2023-01-11 04:36:36 -0600 | |
---|---|---|
committer | 2023-01-11 11:36:36 +0100 | |
commit | 3512325e4647fc76e6ce82ea44e2a321a0809451 (patch) | |
tree | 155643e96f98e66fac369a879317bb7e0b1efd31 /internal/api | |
parent | [feature] Implement Report database model and utility functions (#1310) (diff) | |
download | gotosocial-3512325e4647fc76e6ce82ea44e2a321a0809451.tar.xz |
[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
Diffstat (limited to 'internal/api')
-rw-r--r-- | internal/api/model/well-known.go | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/internal/api/model/well-known.go b/internal/api/model/well-known.go index 384361fd0..bf61a6085 100644 --- a/internal/api/model/well-known.go +++ b/internal/api/model/well-known.go @@ -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"` +} |