🗑️ Clean up command related stuff

🚚 Move http package to web
This commit is contained in:
2025-03-01 13:00:50 +08:00
parent fbb670b96b
commit 481404c4a2
22 changed files with 16 additions and 791 deletions

View File

@ -0,0 +1,19 @@
package api
import (
"git.solsynth.dev/hypernet/nexus/pkg/internal/directory"
"github.com/gofiber/fiber/v2"
"github.com/samber/lo"
)
func listExistsService(c *fiber.Ctx) error {
services := directory.ListServiceInstance()
return c.JSON(lo.Map(services, func(item *directory.ServiceInstance, index int) map[string]any {
return map[string]any{
"id": item.ID,
"type": item.Type,
"label": item.Label,
}
}))
}