-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* [Feat]: Refresh token redis에 저장 (#12) Redis 세팅 refresh token 저장 로직 구현 Related to: #11 * [Feat]: 토큰 재발급 API 구현 (#14) 기존의 AuthService 명칭 SocialService로 변경 토큰 재발급 API 구현 Related to: #13 * 로그아웃 API 구현 (#16) * [Feat]: 로그아웃 API 구현 ErrorCode 추가 SuccessCode 추가 Related to: #15 * [Feat]: 로그아웃 API 구현 Spring Security 권한 문제 수정 Related to: #15 * [Feat]: 로그아웃 API 구현 로그아웃 관련 코드 구현 Related to: #15 * 회원 탈퇴 API 구현 (#18) * [Feat]: 회원 탈퇴 API 구현 SuccessCode 작성 Related to: #17 * [Feat]: 회원 탈퇴 API 구현 탈퇴 로직 작성 Related to: #17 * [Hotfix]: 배포 환경에 H2 코드 주석처리 (#21) security config에 H2 주석처리 Related to: #20 * 닉네임 중복확인 API 구현 (#24) * [Feat]: 닉네임 중복확인 API 구현 Security 경로 추가 Related to: #23 * [Feat]: 닉네임 중복확인 API 구현 중복 확인 로직 구현 Related to: #23 * [Feat]: 약 추가 API 구현 (#27) * [Feat]: 약 추가 API 구현 Pill Entity 생성 PillRepository 생성 Related to: #26 * [Feat]: 약 추가 API 구현 Querydsl 세팅 Related to: #26 * [Fix]: 오탈자와 안쓰는 import 삭제 Related to: #26 * [Feat]: 약 추가 API 구현 API 반환 메세지 입력 BadRequest 예외처리 추가 Related to: #26 * [Feat]: 약 추가 API 구현 약 스케줄 Entity 구현 Related to: #26 * [Feat]: 약 추가 API 구현 약 추가 API 관련 로직 작성 관련 Util 함수 구현 Related to: #26 * [Setting]: Swagger JWT 인증 추가 (#29) SwaggerConfig 파일 변경 약 추가 예외 처리 구현 Related to: #28 * [Feat]: 약 개수 조회 API 구현 (#31) 내 약 개수 API 타인 약 개수 API Related to: #30 * Setting/#35 entity class (#36) * [Setting]: Notice Entity 객체 정의 Notice.java 구현 NoticeStatus.java NoticeType.java Related to: #35 * [Setting]: SendPill Entity 정의 Related to: #35 * [Setting]: Friend Entity 정의 Related to: #35 * [Fix]: H2 배포 코드에서 제외 Related to: #35 * [Setting]: Security Exception 정의 (#37) JWT 토큰 예외에 따른 처리 구현 Related to: #33 * 공유 요청 API 구현 (#39) * [Feat]: 공유 요청 API 구현 FriendController 생성 API 반환 메세지 입력 Related to: #34 * [Feat]: 공유 요청 API 구현 SendFriend Entity 생성 SendFriendRepository 생성 Related to: #34 * [Feat]: 공유 요청 API 구현 NoticeRepository 생성 공유 요청 API 로직 작성 Related to: #34 * [Update]: Swagger 메서드 설명 추가 Related to: #34 * [Update]: 변수명 변경 및 메서드 추출 friendName으로 변경 validateUser 메서드 분리 Related to: #34 * [Update]: 메서드명 변경 FriendQueryRepository생성 isAlreadyFriend로 메서드명 변경 Related to: #34 * [Feat]: 약 전송 API 구현 (#41) * [Feat]: 약 전송 API 구현 controller method 구현 service 구현 repository 구현 Related to: #38 * [Setting]: Security Exception 변경 print문 제거 Related to: #38 * [Feat]: 알림 리스트 조회 API (#45) * [Feat]: 알림 리스트 조회 API 관련 파일 생성 querydsl 메서드 생성 Related to: #42 * [Feat]: 알림 리스트 조회 API 테스트용 하드코딩 삭제 안쓰는 메서드 삭제 Related to: #42 * [Feat]: 알림 약 상세조회 API 구현 (#47) 관련 파일 생성 로직 작성 Related to: #46 * [Feat]: 공유 수락 API 구현 (#43) * [Feat]: 공유 수락 API 구현 공유 수락 API 구현 Related to: #40 * [Update]: 공유 요청 및 수락 예외처리 추가 5명 초과 시 예외처리 추가 Related to: #40 * [Update]: UserServiceUtil 적용 UserServiceUtil 적용 Related to: #40 * [Update]: RequestBody로 변경 RequestParam에서 RequestBody로 변경 Related to: #40 * [Feat]: 전달받은 약 수락 | 거절 API (#51) 관련 파일 생성 로직 작성 Related to: #48 * [Feat]: 약 삭제 API (#53) 약 삭제 로직 작성 Related to: #52 * [Feat]: 친구 리스트 조회 API 구현 (#50) * [Feat]: 친구 리스트 조회 API 구현 친구 리스트 조회 API 구현 Related to: #44 * [Fix]: @transactional 추가 @transactional 추가 Related to: #44 * [Feat]: 친구 이름 수정 API 구현 (#55) 친구 이름 수정 API 구현 Related to: #49 * [Feat]: 유저 닉네임 조회 API 구현 (#57) 유저 닉네임 조회 API 구현 Related to: #56 * [Feat]: 복용 체크 API 구현 (#60) 복용 체크 완료 API 구현 복용 체크 취소 API 구현 Related to: #58 * [Feat]: FCM 연동 및 로직 구현 (#62) 푸시 알림을 위한 FCM 관련 로직 작성 admin-sdk파일 등록 Related to: #59 * [Setting]: CD 워크플로우 업데이트 (#64) jar 파일에 firebase admin-sdk가 추가되도록 스크립트 추가 Related to: #63 * [Feat]: 닉네임 변경 API 구현 (#65) 닉네임 변경 관련 로직 구현 SuccessCode 추가 Related to: #54 * [Feat]: 내 약 리스트 조회 API (#67) 내 약 리스트 조회 API 로직 구현 Related to: #66 * [Feat]: 내 약 상세조회 API (#69) 약의 scheduleTime을 반환하는 querydsl 구현 관련 로직 작성 Related to: #68 * [Feat]: 친구 요청 여부 확인 API (#71) 관련 로직 작성 Related to: #70 * [Feat]: 스티커 전체조회 API (#73) 스티커 전체조회 API 구현 Related to: #61 * [Feat]: 스티커 전송 API 구현 (#75) LikeSchedule Entity 추가 스티커 전송 API 구현 Related to: #74 * [Feat]: 보낸 스티커 수정 API 구현 (#77) 보낸 스티커 수정 API 구현 Related to: #76 * [Feat]: 받은 스티커 전체 조회 API 구현 (#79) LikeScheduleQueryRepository 추가 받은 스티커 전체 조회 API 구현 Related to: #78 * [Feat]: 내 캘린더 조회 API (#81) controller, service, repositoy 로직 작성 날짜 계산 util 구현 Related to: #72 * [Feat]: 특정 일자 복약 일정 조회 (#83) * [Feat]: 특정 일자 복약 일정 조회 controller, service, repository 로직 구현 Related to: #82 * [Feat]: 특정 일자 복약 일정 조회 주석 코드 삭제 Related to: #82 * [Feat]: 친구 복약 일정 조회 API (#85) controller, service, repository 구현 Related to: #84 * [Feat]: 친구 특정 일자 복약 API 구현 (#87) controller, service, repository 구현 Related to: #86 * [CD]: 워크플로우에 firebase 추가 --------- Co-authored-by: Suhyeon <[email protected]>
- Loading branch information
1 parent
5cd61f1
commit f65525f
Showing
77 changed files
with
2,599 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
src/main/java/io/sobok/SobokSobok/auth/application/util/UserServiceUtil.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package io.sobok.SobokSobok.auth.application.util; | ||
|
||
import io.sobok.SobokSobok.auth.domain.User; | ||
import io.sobok.SobokSobok.auth.infrastructure.UserRepository; | ||
import io.sobok.SobokSobok.exception.ErrorCode; | ||
import io.sobok.SobokSobok.exception.model.NotFoundException; | ||
import lombok.AccessLevel; | ||
import lombok.NoArgsConstructor; | ||
|
||
@NoArgsConstructor(access = AccessLevel.PRIVATE) | ||
public class UserServiceUtil { | ||
|
||
public static User findUserById(UserRepository userRepository, Long id) { | ||
return userRepository.findById(id) | ||
.orElseThrow(() -> new NotFoundException(ErrorCode.UNREGISTERED_USER)); | ||
} | ||
|
||
public static void existsUserById(UserRepository userRepository, Long id) { | ||
if (!userRepository.existsById(id)) { | ||
throw new NotFoundException(ErrorCode.UNREGISTERED_USER); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
src/main/java/io/sobok/SobokSobok/auth/ui/dto/UsernameRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package io.sobok.SobokSobok.auth.ui.dto; | ||
|
||
import jakarta.validation.constraints.NotBlank; | ||
|
||
public record UsernameRequest( | ||
|
||
@NotBlank | ||
String username | ||
) { | ||
} |
14 changes: 14 additions & 0 deletions
14
src/main/java/io/sobok/SobokSobok/auth/ui/dto/UsernameResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package io.sobok.SobokSobok.auth.ui.dto; | ||
|
||
import io.sobok.SobokSobok.auth.domain.SocialType; | ||
import lombok.Builder; | ||
|
||
@Builder | ||
public record UsernameResponse( | ||
Long memberId, | ||
String memberName, | ||
SocialType deviceOS, | ||
Boolean selfCheck | ||
) { | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
package io.sobok.SobokSobok.config; | ||
|
||
import com.google.auth.oauth2.GoogleCredentials; | ||
import com.google.firebase.FirebaseApp; | ||
import com.google.firebase.FirebaseOptions; | ||
import com.google.firebase.messaging.FirebaseMessaging; | ||
import org.springframework.beans.factory.annotation.Value; | ||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
import org.springframework.core.io.ClassPathResource; | ||
|
||
import java.io.IOException; | ||
import java.io.InputStream; | ||
import java.util.List; | ||
|
||
@Configuration | ||
public class FCMConfig { | ||
|
||
@Value("${firebase.admin-sdk}") | ||
String adminSdkFileName; | ||
|
||
@Bean | ||
FirebaseMessaging firebaseMessaging() throws IOException { | ||
ClassPathResource resource = new ClassPathResource("firebase/" + adminSdkFileName); | ||
|
||
InputStream refreshToken = resource.getInputStream(); | ||
|
||
FirebaseApp firebaseApp = null; | ||
List<FirebaseApp> firebaseAppList = FirebaseApp.getApps(); | ||
|
||
if (firebaseAppList != null && !firebaseAppList.isEmpty()) { | ||
for (FirebaseApp app : firebaseAppList) { | ||
if (app.getName().equals(FirebaseApp.DEFAULT_APP_NAME)) { | ||
firebaseApp = app; | ||
} | ||
} | ||
} else { | ||
FirebaseOptions options = FirebaseOptions.builder() | ||
.setCredentials(GoogleCredentials.fromStream(refreshToken)) | ||
.build(); | ||
|
||
firebaseApp = FirebaseApp.initializeApp(options); | ||
} | ||
|
||
return FirebaseMessaging.getInstance(firebaseApp); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
src/main/java/io/sobok/SobokSobok/exception/model/ForbiddenException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package io.sobok.SobokSobok.exception.model; | ||
|
||
import io.sobok.SobokSobok.exception.ErrorCode; | ||
|
||
public class ForbiddenException extends SobokException { | ||
|
||
public ForbiddenException(ErrorCode errorCode) { | ||
super(errorCode); | ||
} | ||
} |
Oops, something went wrong.