mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-24 17:28:31 +02:00
refactor(api): restructure existing routes and remove unused debug endpoints and command line arguments
This commit is contained in:
14
internal/api/v1/list_routes.go
Normal file
14
internal/api/v1/list_routes.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package v1
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
config "github.com/yusing/go-proxy/internal/config/types"
|
||||
"github.com/yusing/go-proxy/internal/net/gphttp"
|
||||
"github.com/yusing/go-proxy/internal/route/routes"
|
||||
route "github.com/yusing/go-proxy/internal/route/types"
|
||||
)
|
||||
|
||||
func ListRoutesHandler(cfg config.ConfigInstance, w http.ResponseWriter, r *http.Request) {
|
||||
gphttp.RespondJSON(w, r, routes.ByAlias(route.RouteType(r.FormValue("type"))))
|
||||
}
|
||||
Reference in New Issue
Block a user