You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by me...@apache.org on 2020/03/18 00:59:47 UTC

[incubator-apisix] branch master updated: change: local variable 'routes' duplicate in create_radixtree_router function. (#1285)

This is an automated email from the ASF dual-hosted git repository.

membphis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-apisix.git


The following commit(s) were added to refs/heads/master by this push:
     new ac54197  change: local variable 'routes' duplicate in create_radixtree_router function. (#1285)
ac54197 is described below

commit ac54197238595284485c0844a18423990e9bd4e9
Author: Yousa <sn...@gmail.com>
AuthorDate: Wed Mar 18 08:59:41 2020 +0800

    change: local variable 'routes' duplicate in create_radixtree_router function. (#1285)
---
 lua/apisix/http/router/radixtree_host_uri.lua | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lua/apisix/http/router/radixtree_host_uri.lua b/lua/apisix/http/router/radixtree_host_uri.lua
index cee7b2c..8b2841c 100644
--- a/lua/apisix/http/router/radixtree_host_uri.lua
+++ b/lua/apisix/http/router/radixtree_host_uri.lua
@@ -113,10 +113,10 @@ local function create_radixtree_router(routes)
     end
 
     -- create router: only_uri_router
-    local routes = plugin.api_routes()
-    core.log.info("routes", core.json.delay_encode(routes, true))
+    local api_routes = plugin.api_routes()
+    core.log.info("api_routes", core.json.delay_encode(api_routes, true))
 
-    for _, route in ipairs(routes) do
+    for _, route in ipairs(api_routes) do
         if type(route) == "table" then
             core.table.insert(only_uri_routes, {
                 paths = route.uris or route.uri,