Skip to content

Commit

Permalink
ADM-834:[backend]feat: add dashboard api for site check
Browse files Browse the repository at this point in the history
  • Loading branch information
PengxiWPix committed Apr 7, 2024
1 parent a77a7c1 commit 461af35
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
5 changes: 3 additions & 2 deletions backend/src/main/java/heartbeat/client/JiraFeignClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ CardHistoryResponseDTO getJiraCardHistoryByCount(URI baseUrl, @PathVariable Stri
@GetMapping(path = "rest/api/2/project/{projectIdOrKey}")
JiraBoardProject getProject(URI baseUrl, @PathVariable String projectIdOrKey, @RequestHeader String authorization);

@GetMapping(path = "/")
void getDomain(URI baseUrl);
@GetMapping(path = "/rest/api/3/dashboard")
String getDashboard(URI baseUrl, @RequestHeader String authorization);

}
Original file line number Diff line number Diff line change
Expand Up @@ -137,15 +137,17 @@ public String verify(BoardType boardType, BoardVerifyRequestParam boardVerifyReq
verifyBoardTypeIsJira(boardType);

try {
jiraFeignClient.getDomain(baseUrl);
String test = jiraFeignClient.getDashboard(baseUrl, boardVerifyRequestParam.getToken());
System.out.println(test);
System.out.println("asdfasdfasdfasdfasdfasdfasdf");
}
catch (NotFoundException e) {
System.out.println(e);
System.out.println("===============================================");
throw new NotFoundException("site is incorrect");
}

try {
System.out.println(boardVerifyRequestParam.getBoardId());
System.out.println(boardVerifyRequestParam.getToken());

JiraBoardVerifyDTO jiraBoardVerifyDTO = jiraFeignClient.getBoard(baseUrl,
boardVerifyRequestParam.getBoardId(), boardVerifyRequestParam.getToken());
Expand Down

0 comments on commit 461af35

Please sign in to comment.