Skip to content

Commit

Permalink
feature: add getMissionAvailableStatus and getSurvivalUploadStatus lo…
Browse files Browse the repository at this point in the history
…gic to getDaytimePage
  • Loading branch information
Ji-soo708 committed Apr 24, 2024
1 parent 8183083 commit a2903b3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,12 @@ public class MainViewController implements MainViewApi {
private final MemberPickService memberPickService;
private final MemberBridge memberBridge;
private final MissionBridge missionBridge;
private final PostController postController;

private static final int PAGE_FETCH_SIZE = 1000;

@Override
public DaytimePageResponse getDaytimePage(
boolean isMissionUnlocked,
boolean isMeUploadedToday,
String loginMemberId
) {
String familyId = memberBridge.getFamilyIdByMemberId(loginMemberId);
Expand Down Expand Up @@ -67,6 +66,10 @@ public DaytimePageResponse getDaytimePage(

String todayMissionId = missionBridge.getTodayMissionId();
String dailyMissionContent = missionBridge.getContentByMissionId(todayMissionId);
boolean isMissionUnlocked = postController.getMissionAvailableStatus(loginMemberId, loginMemberId, familyId)
.isMissionUnlocked();
boolean isMeUploadedToday = postController.getSurvivalUploadStatus(loginMemberId, loginMemberId, familyId)
.isMeUploadedToday();


return new DaytimePageResponse(
Expand Down
10 changes: 0 additions & 10 deletions gateway/src/main/java/com/oing/restapi/MainViewApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
Expand All @@ -27,15 +26,6 @@ public interface MainViewApi {
@Operation(summary = "주간의 메인 페이지 조회")
@GetMapping("/daytime-page")
DaytimePageResponse getDaytimePage(

@RequestParam(required = false, defaultValue = "true")
@Parameter(description = "(디버그용) 미션 해금 여부 조작 필드", example = "true")
boolean isMissionUnlocked,

@RequestParam(required = false, defaultValue = "true")
@Parameter(description = "(디버그용) 오늘 나 업로드 여부 조작 필드", example = "true")
boolean isMeUploadedToday,

@Parameter(hidden = true)
@LoginMemberId
String loginMemberId
Expand Down

0 comments on commit a2903b3

Please sign in to comment.