✨ Introducing API Level
This commit is contained in:
parent
f7d82bc93a
commit
c0edeec621
@ -1,6 +1,7 @@
|
|||||||
package api
|
package api
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
pkg "git.solsynth.dev/hypernet/nexus/pkg/internal"
|
||||||
"git.solsynth.dev/hypernet/nexus/pkg/internal/auth"
|
"git.solsynth.dev/hypernet/nexus/pkg/internal/auth"
|
||||||
"git.solsynth.dev/hypernet/nexus/pkg/internal/http/ws"
|
"git.solsynth.dev/hypernet/nexus/pkg/internal/http/ws"
|
||||||
"github.com/gofiber/contrib/websocket"
|
"github.com/gofiber/contrib/websocket"
|
||||||
@ -12,7 +13,11 @@ func MapAPIs(app *fiber.App) {
|
|||||||
wellKnown := app.Group("/.well-known").Name("Well Known")
|
wellKnown := app.Group("/.well-known").Name("Well Known")
|
||||||
{
|
{
|
||||||
wellKnown.Get("/", func(c *fiber.Ctx) error {
|
wellKnown.Get("/", func(c *fiber.Ctx) error {
|
||||||
return c.SendStatus(fiber.StatusOK)
|
return c.JSON(fiber.Map{
|
||||||
|
"api_level": pkg.ApiLevel,
|
||||||
|
"version": pkg.AppVersion,
|
||||||
|
"status": true,
|
||||||
|
})
|
||||||
})
|
})
|
||||||
wellKnown.Get("/check-ip", getClientIP)
|
wellKnown.Get("/check-ip", getClientIP)
|
||||||
wellKnown.Get("/directory/services", listExistsService)
|
wellKnown.Get("/directory/services", listExistsService)
|
||||||
|
@ -2,4 +2,5 @@ package pkg
|
|||||||
|
|
||||||
const (
|
const (
|
||||||
AppVersion = "1.0.0"
|
AppVersion = "1.0.0"
|
||||||
|
ApiLevel = 10
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user