diff --git a/pkg/internal/http/api/index.go b/pkg/internal/http/api/index.go index 4c00a30..ce43ac2 100644 --- a/pkg/internal/http/api/index.go +++ b/pkg/internal/http/api/index.go @@ -1,6 +1,7 @@ package api import ( + pkg "git.solsynth.dev/hypernet/nexus/pkg/internal" "git.solsynth.dev/hypernet/nexus/pkg/internal/auth" "git.solsynth.dev/hypernet/nexus/pkg/internal/http/ws" "github.com/gofiber/contrib/websocket" @@ -12,7 +13,11 @@ func MapAPIs(app *fiber.App) { wellKnown := app.Group("/.well-known").Name("Well Known") { 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("/directory/services", listExistsService) diff --git a/pkg/internal/meta.go b/pkg/internal/meta.go index e0251b4..2a8b93b 100644 --- a/pkg/internal/meta.go +++ b/pkg/internal/meta.go @@ -2,4 +2,5 @@ package pkg const ( AppVersion = "1.0.0" + ApiLevel = 10 )