fix route provider name

This commit is contained in:
yusing
2025-01-12 13:49:47 +08:00
parent 2c3672a7ea
commit 6b6dae129f
7 changed files with 45 additions and 31 deletions

View File

@@ -59,6 +59,8 @@ func List(cfg config.ConfigInstance, w http.ResponseWriter, r *http.Request) {
}
}
// if which is "all" or empty, return map[string]Route of all routes
// otherwise, return a single Route with alias which or nil if not found.
func listRoute(which string) any {
if which == "" || which == "all" {
return routes.RoutesByAlias()