Skip to content

Commit

Permalink
Type: 챌린지 totalcost 요청 방식 변경 (#73)
Browse files Browse the repository at this point in the history
[Chore] 챌린지 totalcost 요청 방식 변경
  • Loading branch information
pingowl authored Nov 8, 2023
2 parents aaf61ba + c8815c3 commit 43dcfc4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
9 changes: 1 addition & 8 deletions .github/workflows/github-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,7 @@ jobs:
echo "${{ secrets.PROPERTIES }}" >> ./application.properties
shell: bash

# 환경 변수 설정 (Firebase)
- name: create-json
id: create-json
uses: jsdaniell/[email protected]
with:
name: ${{ secrets.FIREBASE_JSON_FILENAME }}
json: ${{ secrets.FIREBASE_JSON }}
dir: 'src/main/resources/firebase'


- name: Build with Gradle
run: |
Expand Down
7 changes: 4 additions & 3 deletions src/main/java/igoMoney/BE/controller/ChallengeController.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

@RestController
@RequiredArgsConstructor
Expand Down Expand Up @@ -75,9 +74,11 @@ public ResponseEntity<Void> giveupChallenge(@PathVariable Long userId) {

// 챌린지의 각 사용자별 누적금액 조회
@GetMapping("total-cost")
public ResponseEntity<ChallengeTotalCostResponse> getTotalCostPerChallengeUser(@RequestBody Map<String, Long> request) {
public ResponseEntity<ChallengeTotalCostResponse> getTotalCostPerChallengeUser(
@RequestParam(value="challengeId") Long challengeId,
@RequestParam(value="userId") Long userId) {

ChallengeTotalCostResponse response = challengeService.getTotalCostPerChallengeUser(request.get("challengeId"), request.get("userId"));
ChallengeTotalCostResponse response = challengeService.getTotalCostPerChallengeUser(challengeId, userId);

return ResponseEntity.status(HttpStatus.OK).body(response);
}
Expand Down

0 comments on commit 43dcfc4

Please sign in to comment.