haydenzhourepo commented on a change in pull request #5422:
URL: https://github.com/apache/dolphinscheduler/pull/5422#discussion_r628600788
##########
File path:
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/AccessTokenController.java
##########
@@ -74,20 +72,18 @@
@PostMapping(value = "/create")
@ResponseStatus(HttpStatus.CREATED)
@ApiException(CREATE_ACCESS_TOKEN_ERROR)
- @AccessLogAnnotation(ignoreRequestArgs = "loginUser")
- public Result createToken(@ApiIgnore @RequestAttribute(value =
Constants.SESSION_USER) User loginUser,
- @RequestParam(value = "userId") int userId,
+ @AccessLogAnnotation()
+ public Result createToken(@RequestParam(value = "userId") int userId,
@RequestParam(value = "expireTime") String
expireTime,
@RequestParam(value = "token") String token) {
- Map<String, Object> result = accessTokenService.createToken(loginUser,
userId, expireTime, token);
+ Map<String, Object> result =
accessTokenService.createToken(AuthUtils.getLoginUser(), userId, expireTime,
token);
Review comment:
there are too many login user parameters passed, this change remove all
login user parameters make code concise。
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]