monkeyDluffy6017 commented on code in PR #9482:
URL: https://github.com/apache/apisix/pull/9482#discussion_r1203422007


##########
apisix/admin/init.lua:
##########
@@ -142,14 +162,8 @@ end
 
 
 local function run()
-    local api_ctx = {}
-    core.ctx.set_vars_meta(api_ctx)
-    ngx.ctx.api_ctx = api_ctx
-
-    local ok, err = check_token(api_ctx)
-    if not ok then
-        core.log.warn("failed to check token: ", err)
-        core.response.exit(401, {error_msg = "failed to check token"})
+    if not set_ctx_and_check_token() then

Review Comment:
   no return value is needed, the `core.response.exit` will terminate the 
processing of the current request



-- 
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