You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-- this will hold both paths and route names to prevent them from being-- redeclared by paths lower in precedence
filled_route_names ={}
filled_route_paths ={}
each_route @,true,(path, handler)->
route_name, path_string =iftype(path)=="table"next(path), path[next path]elsenil, path
if route_name
returnif filled_route_names[route_name]
filled_route_names[route_name]=truereturnif filled_route_paths[path_string]
filled_route_paths[path_string]=true@router\add_route path,@wrap_handler handler
This used to work before, but now there is this code:
https://github.com/leafo/lapis/blob/v1.14.0/lapis/application.moon#L179-L194
This means that if
route_name
==path_string
OR thatroute_name
has collision with other route'spath_string
theadd_route
may be skipped.I have been trying to update this library from 1.8.3 to 1.14.0 in Kong, and found this to be problematic for us as we do:
https://github.com/Kong/kong/blob/master/kong/api/api_helpers.lua#L429
Not sure if this was intent, but just letting you know.
The text was updated successfully, but these errors were encountered: