Skip to content

Commit

Permalink
fix: 출석체크 API 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
junseokkim committed Feb 18, 2024
1 parent 52c4cb3 commit cc61f45
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public void addInterceptors(InterceptorRegistry registry) {
registry.addInterceptor(lastActiveInterceptor)
.addPathPatterns("/**") // 모든 요청에 대해 인터셉터 적용
.excludePathPatterns("/v3/**", "/swagger-ui/**") // 스웨거 요청은 제외
.excludePathPatterns("/members/login", "/members"); // 로그인 및 회원가입 API 제외
.excludePathPatterns("/members/login", "/members", "/members/attend", "/invites/**"); // 로그인 및 회원가입 API 제외
}

//cors 에러 해결
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,9 @@ public MemberSearchInfosResponse searchMemberInfo(Member loginMember, String key
public MemberAttendResponse attendMember(Member loingMember) {

Member member = loadEntity(loingMember.getId());
LocalDate lastActiveDate = member.getLastActiveTime().toLocalDate();
LocalDateTime lastActiveTime = member.getLastActiveTime();

if (!lastActiveDate.equals(LocalDate.now())) {
if (lastActiveTime == null || !lastActiveTime.toLocalDate().equals(LocalDate.now())) {
member.addRemainPoint(1L);
return new MemberAttendResponse(true);
}
Expand Down

0 comments on commit cc61f45

Please sign in to comment.