Skip to content

Commit

Permalink
Release (#88)
Browse files Browse the repository at this point in the history
* [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
dev-Crayon and onpyeong authored Feb 14, 2024
1 parent 5cd61f1 commit f65525f
Show file tree
Hide file tree
Showing 77 changed files with 2,599 additions and 26 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/CD-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,15 @@ jobs:
# application.yml 파일 생성
touch ./application.yml
# firebase 폴더 생성
mkdir firebase
# firebase admin-sdk 파일 생성
touch ./firebase/sobok-76d0a-firebase-adminsdk-qb2ez-cedea5e056.json
# Github-Actions 에서 설정한 값을 json 파일에 입력
echo "${{ secrets.SOBOKSOBOK_FIREBASE }}" >> ./firebase/sobok-76d0a-firebase-adminsdk-qb2ez-cedea5e056.json
# GitHub-Actions 에서 설정한 값을 application.yml 파일에 쓰기
echo "${{ secrets.SOBOKSOBOK_DEPLOY }}" >> ./application.yml
Expand Down
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -178,4 +178,7 @@ gradle-app.setting
# Environment Variables
application-local.yml
application-dev.yml
application-prod.yml
application-prod.yml

# firebase admin sdk
sobok-76d0a-firebase-adminsdk-qb2ez-cedea5e056.json
3 changes: 3 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ dependencies {
implementation group: 'io.jsonwebtoken', name: 'jjwt-impl', version: '0.11.2'
implementation group: 'io.jsonwebtoken', name: 'jjwt-jackson', version: '0.11.2'

// firebase
implementation 'com.google.firebase:firebase-admin:9.2.0'

// Swagger
implementation group: 'org.springdoc', name: 'springdoc-openapi-starter-webmvc-ui', version: '2.3.0'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
package io.sobok.SobokSobok.auth.application;

import io.sobok.SobokSobok.auth.application.util.UserServiceUtil;
import io.sobok.SobokSobok.auth.domain.User;
import io.sobok.SobokSobok.auth.infrastructure.UserRepository;
import io.sobok.SobokSobok.auth.ui.dto.UsernameResponse;
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;

import io.sobok.SobokSobok.exception.ErrorCode;
import io.sobok.SobokSobok.exception.model.ConflictException;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
Expand All @@ -17,4 +25,36 @@ public Boolean duplicateNickname(String username) {

return userRepository.existsByUsername(username);
}

@Transactional
public List<UsernameResponse> getUsername(Long userId, String username) {
UserServiceUtil.existsUserById(userRepository, userId);

Optional<User> optionalMember = userRepository.findByUsername(username);

List<UsernameResponse> result = new ArrayList<>();

optionalMember.ifPresent(
member -> result.add(UsernameResponse.builder()
.memberId(member.getId())
.memberName(member.getUsername())
.deviceOS(member.getSocialInfo().getSocialType())
.selfCheck(member.getId().equals(userId))
.build())
);

return result;
}

@Transactional
public void changeUsername(Long userId, String username) {

User user = UserServiceUtil.findUserById(userRepository, userId);

if (duplicateNickname(username)) {
throw new ConflictException(ErrorCode.ALREADY_USING_USERNAME);
}

user.changeUsername(username);
}
}
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);
}
}
}
4 changes: 4 additions & 0 deletions src/main/java/io/sobok/SobokSobok/auth/domain/User.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ public void updateDeviceToken(String newDeviceToken) {
this.deviceToken = newDeviceToken;
}

public void changeUsername(String username) {
this.username = username;
}

public void deleteUser() {
this.deviceToken = "";
this.username = "";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,6 @@ public interface UserRepository extends JpaRepository<User, Long> {
Boolean existsBySocialInfoSocialId(String socialId);

Boolean existsByUsername(String username);

Optional<User> findByUsername(String username);
}
42 changes: 42 additions & 0 deletions src/main/java/io/sobok/SobokSobok/auth/ui/UserController.java
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
package io.sobok.SobokSobok.auth.ui;

import io.sobok.SobokSobok.auth.application.UserService;
import io.sobok.SobokSobok.auth.domain.User;
import io.sobok.SobokSobok.auth.ui.dto.UsernameRequest;
import io.sobok.SobokSobok.auth.ui.dto.UsernameResponse;
import io.sobok.SobokSobok.common.dto.ApiResponse;
import io.sobok.SobokSobok.exception.SuccessCode;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import java.util.List;

import jakarta.validation.Valid;
import lombok.RequiredArgsConstructor;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.security.core.annotation.AuthenticationPrincipal;
import org.springframework.web.bind.annotation.*;

@RestController
Expand All @@ -32,4 +39,39 @@ public ResponseEntity<ApiResponse<Boolean>> isNicknameDuplicate(@RequestParam fi
userService.duplicateNickname(username)
));
}

@GetMapping("/search")
@Operation(
summary = "유저 닉네임 조회 API 메서드",
description = "공유 멤버(유저) 닉네임을 조회하는 메서드입니다."
)
public ResponseEntity<ApiResponse<List<UsernameResponse>>> getUsername(
@AuthenticationPrincipal User user,
@RequestParam final String username
) {
return ResponseEntity
.status(HttpStatus.OK)
.body(ApiResponse.success(
SuccessCode.GET_USERNAME_SUCCESS,
userService.getUsername(user.getId(), username)
));
}

@PutMapping("/nickname")
@Operation(
summary = "유저 닉네임 변경 API 메서드",
description = "유저 본인의 닉네임을 변경하는 메서드입니다."
)
public ResponseEntity<ApiResponse<Void>> changeUsername(
@AuthenticationPrincipal User user,
@RequestBody @Valid final UsernameRequest request
) {

userService.changeUsername(user.getId(), request.username());
return ResponseEntity
.status(HttpStatus.OK)
.body(ApiResponse.success(
SuccessCode.CHANGE_NICKNAME_SUCCESS
));
}
}
10 changes: 10 additions & 0 deletions src/main/java/io/sobok/SobokSobok/auth/ui/dto/UsernameRequest.java
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
) {
}
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
) {

}
47 changes: 47 additions & 0 deletions src/main/java/io/sobok/SobokSobok/config/FCMConfig.java
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);
}
}
7 changes: 6 additions & 1 deletion src/main/java/io/sobok/SobokSobok/config/SecurityConfig.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package io.sobok.SobokSobok.config;

import io.sobok.SobokSobok.security.jwt.JwtCustomFilter;
import io.sobok.SobokSobok.security.filter.ExceptionHandlerFilter;
import io.sobok.SobokSobok.security.filter.JwtCustomFilter;
import io.sobok.SobokSobok.security.jwt.JwtProvider;
import lombok.RequiredArgsConstructor;
//import org.springframework.boot.autoconfigure.security.servlet.PathRequest;
Expand Down Expand Up @@ -62,6 +63,10 @@ public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Excepti
new JwtCustomFilter(jwtProvider),
UsernamePasswordAuthenticationFilter.class
)
.addFilterBefore(
new ExceptionHandlerFilter(),
JwtCustomFilter.class
)
;

return http.build();
Expand Down
29 changes: 29 additions & 0 deletions src/main/java/io/sobok/SobokSobok/exception/ErrorCode.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,49 @@ public enum ErrorCode {
INVALID_REQUEST_BODY(HttpStatus.BAD_REQUEST, "잘못된 Request body입니다."),
BAD_REQUEST_EXCEPTION(HttpStatus.BAD_REQUEST, "잘못된 형식의 요청입니다."),
FILE_SAVE_EXCEPTION(HttpStatus.INTERNAL_SERVER_ERROR, "파일 생성에 실패했습니다."),
FORBIDDEN_EXCEPTION(HttpStatus.FORBIDDEN, "접근 권한이 없습니다."),

// auth
UNREGISTERED_USER(HttpStatus.NOT_FOUND, "등록되지 않은 사용자입니다."),
UNREGISTERED_TOKEN(HttpStatus.NOT_FOUND, "등록되지 않은 토큰입니다."),
NOT_LOGGED_IN_USER(HttpStatus.NOT_FOUND, "로그인되지 않은 사용자입니다."),
ALREADY_EXISTS_USER(HttpStatus.CONFLICT, "이미 회원가입이 완료된 사용자입니다."),
ALREADY_USING_USERNAME(HttpStatus.CONFLICT, "이미 사용중인 username입니다."),
EMPTY_DEVICE_TOKEN(HttpStatus.NOT_FOUND, "디바이스 토큰이 존재하지 않습니다."),

// jwt
EXPIRED_TOKEN(HttpStatus.UNAUTHORIZED, "만료된 토큰입니다."),
MALFORMED_TOKEN(HttpStatus.UNAUTHORIZED, "잘못된 형식의 토큰입니다"),
NULL_TOKEN(HttpStatus.UNAUTHORIZED, "토큰이 존재하지 않습니다."),

// pill
EXCEEDED_PILL_COUNT(HttpStatus.BAD_REQUEST, "약 개수가 초과됐습니다."),
INVALID_PILL_REQUEST_DATA(HttpStatus.BAD_REQUEST, "허용되지 않은 약 추가 요청 데이터입니다."),
UNREGISTERED_PILL(HttpStatus.NOT_FOUND, "등록되지 않은 약입니다."),
UNAUTHORIZED_PILL(HttpStatus.FORBIDDEN, "접근 권한이 없는 약입니다."),
NOT_SEND_PILL(HttpStatus.NOT_FOUND, "전송된 적이 없는 약입니다."),
UNREGISTERED_PILL_SCHEDULE(HttpStatus.NOT_FOUND, "등록되지 않은 약 일정입니다."),
UNCONSUMED_PILL(HttpStatus.BAD_REQUEST, "복용하지 않은 약입니다."),


// friend
INVALID_SELF_ADD_FRIEND(HttpStatus.BAD_REQUEST, "자신에게 캘린더 공유 요청을 할 수 없습니다."),
ALREADY_FRIEND(HttpStatus.CONFLICT, "이미 캘린더 공유 요청이 되었습니다."),
EXCEEDED_FRIEND_COUNT(HttpStatus.CONFLICT, "친구 수가 초과됐습니다."),
NOT_FRIEND(HttpStatus.FORBIDDEN, "친구 관계가 아닙니다."),

// notice
NON_EXISTS_NOTICE(HttpStatus.NOT_FOUND, "존재하지 않는 알림입니다."),
NOT_PILL_NOTICE(HttpStatus.BAD_REQUEST, "약 정보 알림이 아닙니다."),
ALREADY_COMPLETE_NOTICE(HttpStatus.BAD_REQUEST, "이미 처리된 알림입니다."),

// external
INVALID_EXTERNAL_REQUEST_DATA(HttpStatus.BAD_REQUEST, "외부 API 요청에 잘못된 데이터가 전달됐습니다."),

//sticker
UNREGISTERED_STICKER(HttpStatus.NOT_FOUND, "등록되지 않은 스티커입니다."),
ALREADY_SEND_STICKER(HttpStatus.CONFLICT, "이미 스티커를 전송했습니다."),
UNREGISTERED_LIKE_SCHEDULE(HttpStatus.NOT_FOUND, "스티커 전송기록이 존재하지 않습니다."),
;

private final HttpStatus code;
Expand Down
32 changes: 32 additions & 0 deletions src/main/java/io/sobok/SobokSobok/exception/SuccessCode.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,42 @@ public enum SuccessCode {

// user
NICKNAME_CHECK_SUCCESS(HttpStatus.OK, "닉네임 중복 확인에 성공했습니다."),
CHANGE_NICKNAME_SUCCESS(HttpStatus.OK, "닉네임 변경에 성공했습니다."),
GET_USERNAME_SUCCESS(HttpStatus.OK, "유저 이름 조회에 성공했습니다."),

// pill
ADD_PILL_SUCCESS(HttpStatus.CREATED, "약 추가에 성공했습니다."),
GET_PILL_COUNT_SUCCESS(HttpStatus.OK, "약 개수 조회에 성공했습니다."),
GET_PILL_LIST_SUCCESS(HttpStatus.OK, "약 리스트 조회에 성공했습니다."),
GET_PILL_INFO_SUCCESS(HttpStatus.OK, "약 정보 조회에 성공했습니다."),
SEND_PILL_SUCCESS(HttpStatus.CREATED, "약 전송에 성공했습니다."),
DELETE_PILL_SUCCESS(HttpStatus.OK, "약 삭제에 성공했습니다."),

// schedule
CHECK_PILL_SCHEDULE_SUCCESS(HttpStatus.OK, "복용 완료 체크에 성공했습니다."),
UNCHECK_PILL_SCHEDULE_SUCCESS(HttpStatus.OK, "복용 체크 취소에 성공했습니다."),
GET_MONTH_SCHEDULE_SUCCESS(HttpStatus.OK, "월 스케줄 조회에 성공했습니다"),
GET_DATE_SCHEDULE_SUCCESS(HttpStatus.OK, "일 스케줄 조회에 성공했습니다."),
GET_FRIEND_MONTH_SCHEDULE_SUCCESS(HttpStatus.OK, "친구 월 스케줄 조회에 성공했습니다."),
GET_FRIEND_DATE_SCHEDULE_SUCCESS(HttpStatus.OK, "친구 일 스케줄 조회에 성공했습니다."),

// friend
ADD_FRIEND_SUCCESS(HttpStatus.OK, "공유 요청에 성공했습니다."),
GET_FRIEND_LIST_SUCCESS(HttpStatus.OK, "친구 리스트 조회에 성공했습니다."),
HANDLE_FRIEND_REQUEST_SUCCESS(HttpStatus.OK, "공유 응답에 성공했습니다."),
UPDATE_FRIEND_NAME_SUCCESS(HttpStatus.OK, "멤버 이름 수정에 성공했습니다."),
GET_REQUEST_FRIEND_SUCCESS(HttpStatus.OK, "친구 요청 여부 조회에 성공했습니다."),

// notice
GET_NOTICE_LIST_SUCCESS(HttpStatus.OK, "알림 리스트 조회에 성공했습니다."),
GET_RECEIVE_PILL_INFO_SUCCESS(HttpStatus.OK, "전달받은 약 정보 조회에 성공했습니다."),
COMPLETE_PILL_NOTICE(HttpStatus.OK, "약 알림 처리를 완료했습니다."),

//sticker
GET_STICKER_LIST_SUCCESS(HttpStatus.OK, "스티커 전체 조회에 성공했습니다."),
SEND_STICKER_SUCCESS(HttpStatus.OK, "스티커 전송에 성공했습니다."),
UPDATE_STICKER_SUCCESS(HttpStatus.OK, "보낸 스티커 수정에 성공했습니다."),
GET_RECEIVED_STICKER_SUCCESS(HttpStatus.OK, "받은 스티커 전체 조회에 성공했습니다."),
;

private final HttpStatus code;
Expand Down
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);
}
}
Loading

0 comments on commit f65525f

Please sign in to comment.