Example code:
local Router = require "radix-router"
local router, err = Router.new({
{
paths = { "/Accounts/{*middle}/Messages.json" },
handler = "1"
}
})
if not router then
error("failed to create router: " .. err)
end
assert(nil == router:match("/Accounts/", { method = "POST" }))
assert("1" == router:match("/Accounts/abc/123/Messages.json", { method = "POST" }))
This will error on any attempt to match against paths under /Accounts/
Expected Behavior
I expected either:
- Both matches run without erroring, and asserts succeed
- The router fails to create because the path pattern was invalid
Actual Behavior
Errors in router:match with
radix-router.lua:129: attempt to index local 'routes' (a nil value)
radix-router.lua:197: in function 'match'
Example code:
This will error on any attempt to match against paths under
/Accounts/Expected Behavior
I expected either:
Actual Behavior
Errors in
router:matchwith