funky-eyes commented on code in PR #7157:
URL: https://github.com/apache/incubator-seata/pull/7157#discussion_r1950417738


##########
namingserver/src/main/java/org/apache/seata/namingserver/controller/NamingController.java:
##########
@@ -113,14 +115,18 @@ public Result<String> changeGroup(@RequestParam String 
namespace,
                                       @RequestParam String clusterName,
                                       @RequestParam String unitName,
                                       @RequestParam String vGroup) {
-
         Result<String> addGroupResult = namingManager.changeGroup(namespace, 
vGroup, clusterName, unitName);
         if (!addGroupResult.isSuccess()) {
             return addGroupResult;
         }
         return new Result<>("200", "change vGroup " + vGroup + "to cluster " + 
clusterName + " successfully!");
     }
 
+    @GetMapping("/namespace")
+    public SingleResult<Map<String, NamespaceVO>> namespaces() {

Review Comment:
   Since the controller layer does not perform any actions and the VO is the 
data that needs to be displayed on the front end, I believe it is sufficient to 
use Map<String, NamespaceVO> in the response. If we return a DTO to the 
controller side, the controller would need to convert it to VO, which I think 
is redundant.



-- 
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...@seata.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@seata.apache.org
For additional commands, e-mail: notifications-h...@seata.apache.org

Reply via email to