-
Notifications
You must be signed in to change notification settings - Fork 1
[FEAT] 기존 이메일 도메인 수정 및 팀원 초대 로직 추가 #218
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
53 commits
Select commit
Hold shift + click to select a range
16e1f21
[CHORE] 임시 커밋
paragon0107 7c6eda0
[FEAT] pr반영
paragon0107 b9231b5
Merge branch 'develop' of https://github.com/Team-Tiki/TIKI_SERVER in…
paragon0107 bd0dbb1
[FEAT] 팀원 불러오기 컨트롤러 구현
paragon0107 9e1956b
[FEAT] 팀원 불러오기 성공메세지 구현
paragon0107 8ad3ac3
[FEAT] 팀원 불러오기 dto 구현
paragon0107 d7ab446
[FEAT] 팀원 불러오기 서비스단 구현
paragon0107 2c328ed
[FEAT] 팀원 불러오기 어댑터단 구현
paragon0107 f9f7921
[FEAT] 팀원 불러오기 레포지토리 구현
paragon0107 16c0e5e
[FEAT] 팀원 불러오기 프로젝션 구현
paragon0107 0637d6f
[CHORE] 기존 패키지 경로 재설정
paragon0107 c5f2858
[CHORE] 기존 패키지 경로 재설정
paragon0107 2a1a208
[FEAT] 팀 초대 도메인 기초 셋팅
paragon0107 1294a16
Merge branch 'develop' of https://github.com/Team-Tiki/TIKI_SERVER in…
paragon0107 252f638
[FEAT] 임시 작업 반영
paragon0107 32dd292
[CHORE] 패키지 명 변경
paragon0107 fe848d0
[CHORE] 패키지 명 변경
paragon0107 62637b7
[CHORE] 팀 초대 로직 추가
paragon0107 4f038c2
[CHORE] 이메일 센더 상수 수정
paragon0107 c31a2b6
[FEAT] 팀원 초대 컨트롤러 부분 구현
paragon0107 8653046
[FEAT] 팀원 초대 서비스 부분 구현
paragon0107 35ffc00
[FEAT] 메일 템플릿 추가
paragon0107 1d3aea2
[CHORE] 중복 DTO 삭제
paragon0107 154612c
[FEAT] MailSender 팀원 초대 부분 구현
paragon0107 5a6c325
[FEAT] TeamIvitation 도메인 일분 구현
paragon0107 be115fd
[FEAT] 스케줄러 설정 어노테이션 추가
paragon0107 88d6995
[FEAT] TeamInvitation 레이어 구현
paragon0107 0b58688
[FEAT] TeamInvitation 어댑터 부분 구현
paragon0107 d2646c1
[FEAT] TeamInvitation 메세지 구현
paragon0107 154407a
[FEAT] TeamInvitation 엔티티 구현
paragon0107 02c36cb
[FEAT] TeamInvitation DTO 구현
paragon0107 7bd713f
[FEAT] 스케줄러 부분 구현
paragon0107 0907a10
[CHORE] PR반영
paragon0107 2899070
[CHORE] 사용처 없는 의존성 삭제
paragon0107 cf24c77
[CHORE] ResponseStatuse 어노테이션 적용
paragon0107 6e8a85b
[CHORE] ResponseStatuse 어노테이션 적용
paragon0107 f33f2ba
[FEAT] 초대 로직에 멤버 존재하는지 확인하는 메서드 추가
paragon0107 cde57af
[FEAT] 초대 로직에 멤버 존재하는지 확인하는 메서드 추가
paragon0107 4478a06
[CHORE] 컨벤션 적용
paragon0107 bcd118f
[CHORE] 팀원 존재시 에러메시지 추가
paragon0107 8eb7aa3
[FEAT] 이메일 엔티티 비교 메서드 추가
paragon0107 f358e6c
[FEAT] 파라미터 이름 수정
paragon0107 2e9272b
[FEAT] 파라미터 이름 수정
paragon0107 dbb89f0
[FEAT] TeamInvitation 에러 핸들러에 추가
paragon0107 bf1fd67
[CHORE] 초대 템플릿 수정
paragon0107 58e7ff4
[FEAT] 이메일 반환 메서드 추가
paragon0107 d59451e
[CHORE] 초대 수락 엔드포인트 수정
paragon0107 2c62295
[CHORE] 파라미터 이름 수정
paragon0107 4a13719
[CHORE] 반환 형식 수정
paragon0107 d634272
[CHORE] TeamInvitationException 문구 수정
paragon0107 6dcbfb2
[CHORE] 누락된 기능 추가
paragon0107 ca437d9
[CHORE] 리뷰 반영
paragon0107 b07d9b9
Merge branch 'develop' of https://github.com/Team-Tiki/TIKI_SERVER in…
paragon0107 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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
2 changes: 1 addition & 1 deletion
2
...ava/com/tiki/server/common/Constants.java → ...ki/server/common/constants/Constants.java
This file contains hidden or 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 hidden or 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 hidden or 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,6 @@ | ||
| package com.tiki.server.email; | ||
|
|
||
| public class Constants { | ||
| public static final String MAIL_FORMAT_EDU = ".edu"; | ||
| public static final String MAIL_FORMAT_AC_KR = ".ac.kr"; | ||
| } |
This file contains hidden or 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 hidden or 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
19 changes: 19 additions & 0 deletions
19
src/main/java/com/tiki/server/email/emailsender/constants/Constants.java
This file contains hidden or 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,19 @@ | ||
| package com.tiki.server.email.emailsender.constants; | ||
|
|
||
| public class Constants { | ||
|
|
||
| /* 공통 상수 */ | ||
| public static final String TIKI_EMAIL = "[email protected]"; | ||
| public static final String IMG_PATH = "images/mail_logo.png"; | ||
|
|
||
| /* 이메일 인증 관련 상수 */ | ||
| public static final String MAIL_VERIFICATION_CODE = "[Ti.Ki] 회원가입: 이메일 인증번호 안내"; | ||
| public static final String MAIL_PASSWORD_CHANGING_CODE = "[Ti.Ki] 비밀번호 재설정: 이메일 인증번호 안내"; | ||
| public static final String MAIL_INVITE_TEAM_MEMBER = "[Ti.Ki] 워크스페이스 초대 안내"; | ||
| public static final String VERIFICATION_TEMPLATE_NAME = "signup"; | ||
| public static final String CHANGE_PASSWORD_TEMPLATE_NAME = "changePassword"; | ||
| public static final String INVITE_TEAM_MEMBER_TEMPLATE_NAME = "invitation"; | ||
| public static final String PAGE_LOGO_IMAGE_VAR = "image"; | ||
|
|
||
| /* 이메일 초대 관련 상수 */ | ||
| } |
49 changes: 49 additions & 0 deletions
49
src/main/java/com/tiki/server/email/emailsender/controller/EmailSenderController.java
This file contains hidden or 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,49 @@ | ||
| package com.tiki.server.email.emailsender.controller; | ||
|
|
||
| import com.tiki.server.common.dto.SuccessResponse; | ||
| import com.tiki.server.email.emailsender.controller.docs.EmailSenderControllerDocs; | ||
| import com.tiki.server.email.emailsender.controller.dto.request.EmailRequest; | ||
| import com.tiki.server.email.emailsender.message.SuccessMessage; | ||
| import com.tiki.server.email.emailsender.service.EmailSenderService; | ||
| import com.tiki.server.email.emailsender.service.dto.EmailServiceRequest; | ||
| import com.tiki.server.email.emailsender.service.dto.TeamInvitationCreateServiceRequest; | ||
| import lombok.RequiredArgsConstructor; | ||
| import org.springframework.http.HttpStatus; | ||
| import org.springframework.web.bind.annotation.*; | ||
|
|
||
| import java.security.Principal; | ||
|
|
||
| @RestController | ||
| @RequiredArgsConstructor | ||
| @RequestMapping("/api/v1/email") | ||
| public class EmailSenderController implements EmailSenderControllerDocs { | ||
|
|
||
| private final EmailSenderService emailSenderService; | ||
|
|
||
| @ResponseStatus(HttpStatus.OK) | ||
| @PostMapping("/verification/signup") | ||
| public SuccessResponse<?> sendSignUpMail(@RequestBody final EmailRequest mailRequest) { | ||
| emailSenderService.sendSignUp(EmailServiceRequest.from(mailRequest.email())); | ||
| return SuccessResponse.success(SuccessMessage.SUCCESS_SEND_EMAIL.getMessage()); | ||
| } | ||
|
|
||
| @ResponseStatus(HttpStatus.OK) | ||
| @PostMapping("/verification/password") | ||
| public SuccessResponse<?> sendChangingPasswordMail(@RequestBody final EmailRequest mailRequest) { | ||
| emailSenderService.sendPasswordChanging(EmailServiceRequest.from(mailRequest.email())); | ||
| return SuccessResponse.success(SuccessMessage.SUCCESS_SEND_EMAIL.getMessage()); | ||
| } | ||
|
|
||
| @ResponseStatus(HttpStatus.CREATED) | ||
| @PostMapping("/invitation/team/{teamId}") | ||
| public SuccessResponse<?> sendInvitationMail( | ||
| final Principal principal, | ||
| @PathVariable final long teamId, | ||
| @RequestBody final EmailRequest targetEmailRequest | ||
| ) { | ||
| long memberId = Long.parseLong(principal.getName()); | ||
| emailSenderService.createTeamInvitation( | ||
| TeamInvitationCreateServiceRequest.of(targetEmailRequest.email(), teamId, memberId)); | ||
| return SuccessResponse.success(SuccessMessage.SUCCESS_SEND_EMAIL.getMessage()); | ||
| } | ||
| } | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.