api: added some endpoints for dashboard filter to work

This commit is contained in:
yusing
2025-01-20 06:17:18 +08:00
parent bcc7faa8e5
commit 68771ce399
13 changed files with 82 additions and 34 deletions

View File

@@ -18,7 +18,7 @@ import (
E "github.com/yusing/go-proxy/internal/error"
"github.com/yusing/go-proxy/internal/logging"
"github.com/yusing/go-proxy/internal/net/http/middleware"
"github.com/yusing/go-proxy/internal/route/routes"
"github.com/yusing/go-proxy/internal/route/routes/routequery"
"github.com/yusing/go-proxy/internal/task"
"github.com/yusing/go-proxy/pkg"
)
@@ -104,7 +104,7 @@ func main() {
switch args.Command {
case common.CommandListRoutes:
cfg.StartProxyProviders()
printJSON(routes.RoutesByAlias())
printJSON(routequery.RoutesByAlias())
return
case common.CommandListConfigs:
printJSON(cfg.Value())
@@ -113,7 +113,7 @@ func main() {
printJSON(cfg.DumpEntries())
return
case common.CommandDebugListProviders:
printJSON(cfg.DumpProviders())
printJSON(cfg.DumpRouteProviders())
return
}