From 8f204e0c087a675c8ebe603aa56ff1bfda637803 Mon Sep 17 00:00:00 2001 From: kimh7537 Date: Thu, 22 Aug 2024 16:36:34 +0900 Subject: [PATCH] =?UTF-8?q?CICD=20=ED=85=8C=EC=8A=A4=ED=8A=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cotato/squadus/api/club/controller/ClubController.java | 1 + .../squadus/domain/club/common/service/ClubService.java | 6 ++---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/cotato/squadus/api/club/controller/ClubController.java b/src/main/java/com/cotato/squadus/api/club/controller/ClubController.java index 653d858..ea50ec4 100644 --- a/src/main/java/com/cotato/squadus/api/club/controller/ClubController.java +++ b/src/main/java/com/cotato/squadus/api/club/controller/ClubController.java @@ -94,6 +94,7 @@ public ResponseEntity updateClub( @GetMapping("/ranking/{sportsCategory}") + @Operation(summary = "랭킹 목록 조회", description = "랭킹 페이지로 들어가면 ALL TIME 기준의 랭킹 정보를 순위대로 얻을 수 있다.") public ResponseEntity> getRanking(@PathVariable SportsCategory sportsCategory) { List ranking = clubService.getRanking(sportsCategory); return ResponseEntity.ok(ranking); diff --git a/src/main/java/com/cotato/squadus/domain/club/common/service/ClubService.java b/src/main/java/com/cotato/squadus/domain/club/common/service/ClubService.java index 916f254..16dd655 100644 --- a/src/main/java/com/cotato/squadus/domain/club/common/service/ClubService.java +++ b/src/main/java/com/cotato/squadus/domain/club/common/service/ClubService.java @@ -99,10 +99,8 @@ public ClubCreateResponse createClub(CustomOAuth2Member customOAuth2Member, Club Club savedClub = clubRepository.save(club); - long clubCount = clubRepository.countBySportsCategory(club.getSportsCategory()); - if (clubCount >= 5) { - updateClubMatchScore(savedClub.getClubId()); - } + + updateClubScore(club.getSportsCategory(), club.getClubId(), club.getMatchScore()); log.info("동아리 생성됨, clubId : {}", savedClub.getClubId()); return new ClubCreateResponse(savedClub.getClubId());