Skip to content

Commit

Permalink
Fix: 메인페이지 추천활동 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeongho427 committed May 22, 2024
1 parent 47d529f commit ddb87be
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ public class ActivityService {
//특정 활동 상제 정보 response dto화
public ActivityDetailsRes getActivityDetails(Long activityId) {
Activity activity = findActivityById(activityId);
//List<String> imageUrls = getImageUrls(activity);
return ActivityDetailsRes.of(activity);
}

Expand All @@ -54,7 +53,10 @@ private Activity findActivityById(Long activityId) {

//활동 목록 필터링으로 조회
public ReadActivitiesRes findActivities(ReadActivitiesReq activitiesReq) {
Long userId = SecurityContextProvider.getAuthenticatedUserId();
Long userId = 50L;
if (!SecurityContextProvider.isAnonymousUser()) {
userId = SecurityContextProvider.getAuthenticatedUserId();
}
long page = activitiesReq.getPage();
long offset = page * ACTIVITY_PAGE_SIZE;
long limit = ACTIVITY_PAGE_SIZE;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public class UserService {
private final ActivityLikeRepository activityLikeRepository;

public ReadMainRes readMainPage() {
Long userId = 5L;
Long userId = 50L;
if(!SecurityContextProvider.isAnonymousUser())
userId = SecurityContextProvider.getAuthenticatedUserId();
User user = userRepository.findById(userId)
Expand Down

0 comments on commit ddb87be

Please sign in to comment.