moremind commented on code in PR #5823:
URL: https://github.com/apache/shenyu/pull/5823#discussion_r1865844555


##########
shenyu-admin/src/main/java/org/apache/shenyu/admin/controller/NamespacePluginController.java:
##########
@@ -105,30 +104,28 @@ public ShenyuAdminResult 
queryAllNamespacePlugins(@Existed(message = "namespace
     /**
      * detail plugin of namespace.
      *
+     * @param namespaceId namespace id.
      * @param id namespace plugin relation id.
      * @return {@linkplain ShenyuAdminResult}
      */
-    @GetMapping("/{id}")
+    @GetMapping("/detail")

Review Comment:
   not change this, this not restful, 



##########
shenyu-admin/src/main/java/org/apache/shenyu/admin/controller/NamespacePluginController.java:
##########
@@ -105,30 +104,28 @@ public ShenyuAdminResult 
queryAllNamespacePlugins(@Existed(message = "namespace
     /**
      * detail plugin of namespace.
      *
+     * @param namespaceId namespace id.
      * @param id namespace plugin relation id.
      * @return {@linkplain ShenyuAdminResult}
      */
-    @GetMapping("/{id}")
+    @GetMapping("/detail")
     @RequiresPermissions("system:plugin:edit")
-    public ShenyuAdminResult detailNamespacePlugin(@Existed(message = 
"namespace plugin relation is not exist", provider = 
NamespacePluginRelMapper.class)
-                                                   @PathVariable("id") final 
String id) {
-        NamespacePluginVO namespacePluginVO = 
namespacePluginService.findById(id);
+    public ShenyuAdminResult detailNamespacePlugin(@Existed(message = 
"namespace is not existed", provider = NamespaceMapper.class)
+                                                       
@RequestParam("namespaceId") final String namespaceId,
+                                                   @RequestParam("id") final 
String id) {
+        NamespacePluginVO namespacePluginVO = 
namespacePluginService.findByNamespaceIdAndPluginId(namespaceId, id);
         return ShenyuAdminResult.success(ShenyuResultMessage.DETAIL_SUCCESS, 
namespacePluginVO);
     }
 
     /**
      * update plugin of namespace.
      *
-     * @param id                namespace plugin relation id.
      * @param namespacePluginDTO plugin namespace.
      * @return {@linkplain ShenyuAdminResult}
      */
-    @PutMapping("/{id}")
+    @PostMapping("")

Review Comment:
   the original code is true



-- 
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: notifications-unsubscr...@shenyu.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to