Skip to content

Commit

Permalink
๐Ÿ› CORS ์˜ค๋ฅ˜ ์ˆ˜์ •
Browse files Browse the repository at this point in the history
- ์„œ๋น„์Šค ์ฝ”๋“œ๋ฅผ ์ˆ˜์ •ํ•˜์˜€์Šต๋‹ˆ๋‹ค.
  • Loading branch information
Ganghee-Lee-0522 committed Jan 12, 2024
1 parent e282b32 commit 037e905
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public class GitHubService {

@Transactional
public int getRepos(String nickname) {
/*

RestTemplate restTemplate = new RestTemplate();

int page = 1;
Expand Down Expand Up @@ -73,10 +73,6 @@ public int getRepos(String nickname) {
// }
}
return totalCommits;
*/

return 100;
}

private int getCommits(String nickname, List<RepoResponseDto> repositories) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,32 +56,5 @@ public Long setSnowflake(OAuth2MemberDto memberDto) {
log.info("์ปค๋ฐ‹ ์ €์žฅ ๋˜์—ˆ๋Š”์ง€ ์กฐํšŒ: commitRepository.findById -> {}", commitRepository.findById(commit.getId()));

return totalCommits;

// log.info("์ฒซ ๊ฐ€์ž… ์‹œ ๋ˆˆ์†ก์ด ์„ค์ •: setSnowflake");
// log.info("memberDto -> {}", memberDto.getNickname());
//
// // ๊นƒํ—ˆ๋ธŒ์—์„œ ์ปค๋ฐ‹ ๊ฐœ์ˆ˜ ๊ฐ€์ ธ์˜ค๊ธฐ
// String nickname = memberDto.getNickname();
// Long totalCommits = Long.valueOf(gitHubService.getRepos(nickname));
// log.info("setSnowflake๋กœ ๋„˜๊ฒจ์ง„ totalCommits -> {}", totalCommits);
//
// // ๋ฉค๋ฒ„ ์ปค๋ฐ‹ ๊ฐœ์ˆ˜ ์—…๋ฐ์ดํŠธ
// Member member = memberRepository.findByNickname(memberDto.getNickname()).orElseThrow(() -> new MemberException(ErrorCode.MEMBER_NOT_FOUND));
// log.info("๋ฉค๋ฒ„ ๊ธฐ์กด ์ปค๋ฐ‹ ๊ฐœ์ˆ˜ snowflake -> {}", member.getSnowflake());
// member.updateSnowflake(totalCommits);
// log.info("๋ฉค๋ฒ„ ์ปค๋ฐ‹ ๊ฐœ์ˆ˜ ์—…๋ฐ์ดํŠธ snowflake -> {}", member.getSnowflake());
//
// // ์ปค๋ฐ‹ ๊ฐ์ฒด ์ƒ์„ฑ
// Commit commit = Commit.builder()
// .count(totalCommits)
// .member(member)
// .build();
//
// // ์ปค๋ฐ‹ ๊ฐ์ฒด ์ €์žฅ
// commitRepository.save(commit);
// log.info("์ปค๋ฐ‹ ๊ฐ์ฒด -> {}", commit.getCount());
// log.info("์ปค๋ฐ‹ ์ €์žฅ ๋˜์—ˆ๋Š”์ง€ ์กฐํšŒ: commitRepository.findById -> {}", commitRepository.findById(commit.getId()));
//
// return totalCommits;
}
}

0 comments on commit 037e905

Please sign in to comment.