spacewander commented on code in PR #8611:
URL: https://github.com/apache/apisix/pull/8611#discussion_r1065360620


##########
apisix/admin/routes.lua:
##########
@@ -17,39 +17,13 @@
 local expr = require("resty.expr.v1")
 local core = require("apisix.core")
 local apisix_upstream = require("apisix.upstream")
+local resource = require("apisix.admin.resource")
 local schema_plugin = require("apisix.admin.plugins").check_schema
-local utils = require("apisix.admin.utils")
-local tostring = tostring
 local type = type
 local loadstring = loadstring
 
 
-local _M = {
-    version = 0.2,
-    need_v3_filter = true,
-}
-
-
 local function check_conf(id, conf, need_id)
-    if not conf then
-        return nil, {error_msg = "missing configurations"}
-    end
-
-    id = id or conf.id
-    if need_id and not id then
-        return nil, {error_msg = "missing route id"}
-    end
-
-    if not need_id and id then
-        return nil, {error_msg = "wrong route id, do not need it"}
-    end
-
-    if need_id and conf.id and tostring(conf.id) ~= tostring(id) then
-        return nil, {error_msg = "wrong route id"}
-    end
-
-    conf.id = id
-
     core.log.info("schema: ", core.json.delay_encode(core.schema.route))
     core.log.info("conf  : ", core.json.delay_encode(conf))

Review Comment:
   We can move this log to the common part?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to