mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-11 06:37:28 -06:00
[feature] Change instance-stats-randomize to instance-stats-mode with multiple options; implement nodeinfo 2.1 (#3734)
* [feature] Change `instance-stats-randomize` to `instance-stats-mode` with multiple options; implement nodeinfo 2.1 * swaggalaggadingdong
This commit is contained in:
parent
e1781ff52e
commit
07d2770995
18 changed files with 283 additions and 77 deletions
|
|
@ -25,9 +25,12 @@ import (
|
|||
)
|
||||
|
||||
const (
|
||||
NodeInfo2Version = "2.0"
|
||||
NodeInfo2Path = "/" + NodeInfo2Version
|
||||
NodeInfo2ContentType = "application/json; profile=\"http://nodeinfo.diaspora.software/ns/schema/" + NodeInfo2Version + "#\""
|
||||
NodeInfo20 = "2.0"
|
||||
NodeInfo20ContentType = "application/json; profile=\"http://nodeinfo.diaspora.software/ns/schema/" + NodeInfo20 + "#\""
|
||||
NodeInfo21 = "2.1"
|
||||
NodeInfo21ContentType = "application/json; profile=\"http://nodeinfo.diaspora.software/ns/schema/" + NodeInfo21 + "#\""
|
||||
NodeInfoSchema = "schema"
|
||||
NodeInfoPath = "/:" + NodeInfoSchema
|
||||
)
|
||||
|
||||
type Module struct {
|
||||
|
|
@ -41,5 +44,5 @@ func New(processor *processing.Processor) *Module {
|
|||
}
|
||||
|
||||
func (m *Module) Route(attachHandler func(method string, path string, f ...gin.HandlerFunc) gin.IRoutes) {
|
||||
attachHandler(http.MethodGet, NodeInfo2Path, m.NodeInfo2GETHandler)
|
||||
attachHandler(http.MethodGet, NodeInfoPath, m.NodeInfo2GETHandler)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue