Skip to content

Commit

Permalink
Merge pull request #19 from sopt-makers/feat/#5-officialpage-admin
Browse files Browse the repository at this point in the history
  • Loading branch information
Lim-Changi authored Jan 4, 2025
2 parents c44379a + e6dad51 commit 2b41f0f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import java.util.stream.Collectors;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.ObjectProvider;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import sopt.org.homepage.aboutsopt.dto.AboutSoptResponseDto;
Expand All @@ -24,14 +25,14 @@
public class AboutSoptService {
private static final int MINIMUM_PROJECT_COUNT = 10;
private final AboutSoptRepository aboutSoptRepository;
private final MainService mainService;
private final ObjectProvider<MainService> mainServiceProvider;
private final CrewService crewService;
private final PlaygroundService playgroundService;
private final ProjectService projectService;

public GetAboutSoptResponseDto getAboutSopt(Integer generation) {

int currentGeneration = generation != null ? generation : mainService.getLatestGeneration();
int currentGeneration = generation != null ? generation : mainServiceProvider.getObject().getLatestGeneration();


AboutSoptEntity aboutSopt = aboutSoptRepository.findByIdAndIsPublishedTrue(Long.valueOf(currentGeneration))
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/application-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ internal:
token: ${PLAYGROUND_API_URL_JWT_TOKEN}
crew:
url: ${CREW_API_URL}
token: ${CREW_API_URL_JWT_TOKEN}

jwt:
access: ${ACCESS_TOKEN_SECRET}
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/application-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ internal:
token: ${PLAYGROUND_API_URL_JWT_TOKEN}
crew:
url: ${CREW_API_URL}
token: ${CREW_API_URL_JWT_TOKEN}

jwt:
access: ${ACCESS_TOKEN_SECRET}
Expand Down

0 comments on commit 2b41f0f

Please sign in to comment.