Skip to content

Commit

Permalink
Merge pull request #27 from Team-Wable/fix/#26
Browse files Browse the repository at this point in the history
apply QA
  • Loading branch information
Hong0329 authored Sep 30, 2024
2 parents 68bf566 + 7a9fcb3 commit 8e39d96
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.wable.www.WableServer.api;

import com.wable.www.WableServer.common.exception.UnAuthorizedException;
import com.wable.www.WableServer.common.response.ApiResponse;
import com.wable.www.WableServer.common.response.ErrorStatus;
import com.wable.www.WableServer.common.util.MemberUtil;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,25 @@
import jakarta.transaction.Transactional;
import lombok.RequiredArgsConstructor;
import lombok.val;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.core.env.Environment;
import org.springframework.security.core.Authentication;
import org.springframework.stereotype.Service;

import java.security.NoSuchAlgorithmException;
import java.security.spec.InvalidKeySpecException;
import java.util.Objects;

@Service
@RequiredArgsConstructor
public class AuthServiceImpl implements AuthService {

// @Value("${aws-property.s3-default-image-url}")
// private String GHOST_IMAGE_S3;
private final static String DEFAULT_NICKNAME="";

private final JwtTokenProvider jwtTokenProvider;
private final KakaoAuthService kakaoAuthService;
private final AppleAuthService appleAuthService;
private final MemberRepository memberRepository;
private final SlackService slackService;
private final Environment environment;

@Override
@Transactional
Expand All @@ -61,10 +60,11 @@ public AuthResponseDto socialLogin(String socialAccessToken, AuthRequestDto auth
.memberEmail(socialData.getEmail())
.socialNickname(socialData.getNickname())
.build();

memberRepository.save(member);

slackService.sendSlackMessage(memberRepository.count(), "#wable-signup");
if (Objects.equals(environment.getProperty("spring.config.activate.on-profile"), "prod")){
slackService.sendSlackMessage(memberRepository.count(), "#wable-signup");
}

Authentication authentication = new UserAuthentication(member.getId(), null, null);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.wable.www.WableServer.api.lck.service;

import com.wable.www.WableServer.api.lck.domain.LckSchedule;
import com.wable.www.WableServer.api.lck.dto.reponse.LckRankingGetDto;
import com.wable.www.WableServer.api.lck.dto.reponse.LckScheduleByDateDto;
import com.wable.www.WableServer.api.lck.dto.reponse.LckScheduleGetDto;
import com.wable.www.WableServer.api.lck.repository.LckScheduleRepository;
Expand All @@ -16,6 +15,7 @@
import java.time.temporal.TemporalAdjusters;
import java.util.List;
import java.util.Map;
import java.util.TreeMap;
import java.util.stream.Collectors;

@Service
Expand All @@ -35,9 +35,8 @@ public List<LckScheduleByDateDto> getLckSchedule() {
.collect(Collectors.groupingBy(dto -> {
LocalDateTime gameDateTime = LocalDateTime.parse(dto.gameDate(), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm"));
return TimeUtilCustom.refineDateOnly(gameDateTime);
}));
}, TreeMap::new, Collectors.toList()));

// 날짜별로 그룹화된 데이터를 LckScheduleByDateDto로 변환
return groupedByDate.entrySet().stream()
.map(entry -> LckScheduleByDateDto.of(entry.getKey(), entry.getValue()))
.collect(Collectors.toList());
Expand Down

0 comments on commit 8e39d96

Please sign in to comment.