Revolyssup commented on code in PR #9580:
URL: https://github.com/apache/apisix/pull/9580#discussion_r1266214618


##########
apisix/admin/plugins.lua:
##########
@@ -42,7 +44,15 @@ end
 
 function _M.get(name)
     local arg = get_uri_args()
-    if arg and arg["all"] == "true" then
+    -- If subsystem is passed inside args then it should be oneOf: http / 
stream.
+    local subsystem = arg["subsystem"]
+    if subsystem and subsystem ~= "http" and subsystem ~= "stream" then
+        return 400, {error_msg = "unsupported subsystem: "..subsystem}
+    end

Review Comment:
   done



##########
apisix/admin/plugins.lua:
##########
@@ -60,16 +70,20 @@ function _M.get(name)
         return 200, http_plugins
     end
 
-    if not name then
-        return 400, {error_msg = "not found plugin name"}
-    end
+    local plugin
+    -- By default search through http subsystems
+    subsystem = subsystem or "http"

Review Comment:
   done



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