diff options
Diffstat (limited to 'internal/api/nodeinfo/nodeinfo.go')
-rw-r--r-- | internal/api/nodeinfo/nodeinfo.go | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/internal/api/nodeinfo/nodeinfo.go b/internal/api/nodeinfo/nodeinfo.go index bf334b5e2..96adbc956 100644 --- a/internal/api/nodeinfo/nodeinfo.go +++ b/internal/api/nodeinfo/nodeinfo.go @@ -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) } |