wolfboys commented on code in PR #1860:
URL:
https://github.com/apache/incubator-streampark/pull/1860#discussion_r997629241
##########
streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/system/controller/MenuController.java:
##########
@@ -53,8 +53,8 @@ public class MenuController {
private CommonService commonService;
@PostMapping("router")
- public RestResponse getUserRouters() {
- ArrayList<VueRouter<Menu>> routers =
this.menuService.getUserRouters(commonService.getCurrentUser());
+ public RestResponse getUserRouters(@NotBlank(message = "{required}") Long
teamId) {
+ ArrayList<VueRouter<Menu>> routers =
this.menuService.getUserRouters(commonService.getCurrentUser().getUserId(),
teamId);
Review Comment:
The code can be further improve:
`ArrayList<VueRouter<Menu>> routers =
this.menuService.getUserRouters(commonService.getUserId(), teamId);`
##########
streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/system/controller/PassportController.java:
##########
@@ -124,8 +124,6 @@ private Map<String, Object> generateUserInfo(JWTToken
token, User user) {
Set<String> roles = this.roleService.getUserRoleName(username);
Review Comment:
username is not recommended, userId is recommended
--
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]