zixi0825 commented on a change in pull request #2884:
URL: 
https://github.com/apache/incubator-dolphinscheduler/pull/2884#discussion_r444702802



##########
File path: 
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ProjectController.java
##########
@@ -226,6 +227,23 @@ public Result queryAuthorizedProject(@ApiIgnore 
@RequestAttribute(value = Consta
         return returnDataList(result);
     }
 
+    /**
+     * query user created project
+     *
+     * @param loginUser login user
+     * @return projects which the user create
+     */
+    @ApiOperation(value = "queryProjectCreatedByUser", notes = 
"QUERY_USER_CREATED_PROJECT_NOTES")
+
+    @GetMapping(value = "/login-user-created-project")
+    @ResponseStatus(HttpStatus.OK)
+    @ApiException(QUERY_USER_CREATED_PROJECT_ERROR)
+    public Result queryProjectCreatedByUser(@ApiIgnore @RequestAttribute(value 
= Constants.SESSION_USER) User loginUser) {
+        logger.info("login user {}, query authorized project by user id: {}.", 
StringUtils.replaceNRTtoUnderline(loginUser.getUserName()), 
StringUtils.replaceNRTtoUnderline(String.valueOf(loginUser.getId())));
+        Map<String, Object> result = 
projectService.queryProjectCreatedByUser(loginUser, loginUser.getId());

Review comment:
       You're right




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


Reply via email to