Skip to content
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

Feat/get user email api #50

Merged
merged 5 commits into from
Jan 15, 2022
Merged

Feat/get user email api #50

merged 5 commits into from
Jan 15, 2022

Conversation

geeneve
Copy link
Member

@geeneve geeneve commented Jan 15, 2022

✅ PR check list

  • commit message가 적절한지 확인해주세요.
  • 마지막으로 Coding Convention을 준수했는지 확인해주세요.
  • 적절한 branch로 요청했는지 확인해주세요.
  • Assignees, Label을 붙여주세요.
  • 가능한 이슈를 Link 해주세요.
  • PR이 승인된 경우 해당 브랜치는 삭제 부탁드립니다.

🌈 PR 요약

  • 유저의 이메일이 유효한 (중복되지 않고, 형식에 맞는) 이메일인지 확인

📌 변경 사항

  • /auth/email 라우트 추가
  • getEmail Service, Controller 추가

Linked Issue

close #48

@geeneve geeneve added 🍀 feature 새로운 기능 추가 1️⃣ priority: high 우선순위 높음 labels Jan 15, 2022
@geeneve geeneve self-assigned this Jan 15, 2022
Copy link
Contributor

@seohyun-106 seohyun-106 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤪🤪🤪🤪🤪

*/
const getEmailController = async (req: Request, res: Response) => {
try {
const resData: number = await authService.getEmailService(req.body.email);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

오 resData도 형식 지정 .. 저도 일케 해보겠슴다 .. 🤨🤨🤨

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

오호,, 꼼꼼보이

return constant.EMAIL_ALREADY_EXIST;
}

return constant.SUCCESS;
Copy link
Contributor

@seohyun-106 seohyun-106 Jan 15, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

아 맞다 이거 .. 근데 요 상수값은 controller에서는 안쓰는데 클린코드를 위해 사용하는건가여? 🤨🤨🤨

* @route GET /auth/email
* @access public
* @err 1. 필요한 값이 없을 때
* 2. 이메일 형식이 올바르지 않을 때
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

에러? 🧐 에러? 🧐 에러? 🧐 에러? 🧐

* @access public
* @err 1. 필요한 값이 없을 때
* 2. 이메일 형식이 올바르지 않을 때
* 3. 이메일이 이미 존재할 때
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

에러? 🧐 에러? 🧐 에러? 🧐 에러? 🧐

returnCode.OK,
"올바른 형식이 아닙니다.",
true,
{ isUnique: false }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

유니크?? 유니클🧐로 인가요? 🧐
유니크?? 유니클🧐로 인가요? 🧐
유니크?? 유니클🧐로 인가요? 🧐
유니크?? 유니클🧐로 인가요? 🧐
유니크?? 유니클🧐로 인가요? 🧐

returnCode.OK,
"이미 사용 중인 이메일입니다.",
true,
{ isUnique: false }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

유니크?? 유니클🧐로 인가요? 🧐
유니크?? 유니클🧐로 인가요? 🧐
유니크?? 유니클🧐로 인가요? 🧐
유니크?? 유니클🧐로 인가요? 🧐
유니크?? 유니클🧐로 인가요? 🧐

returnCode.OK,
"사용할 수 있는 이메일입니다.",
true,
{ isUnique: true }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

유니크?? 유니클🧐로 인가요? 🧐
유니크?? 유니클🧐로 인가요? 🧐
유니크?? 유니클🧐로 인가요? 🧐
유니크?? 유니클🧐로 인가요? 🧐
유니크?? 유니클🧐로 인가요? 🧐

Copy link
Contributor

@seohyun-106 seohyun-106 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

으이구 ~ 🧐

*/
const getEmailController = async (req: Request, res: Response) => {
try {
const resData: number = await authService.getEmailService(req.body.email);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

오호,, 꼼꼼보이

returnCode.OK,
"올바른 형식이 아닙니다.",
true,
{ isUnique: false }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isUnique 맞나요?😏🤐🤐🤐

@geeneve geeneve merged commit 8813235 into develop Jan 15, 2022
@geeneve geeneve deleted the feat/get-user-email-api branch January 15, 2022 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1️⃣ priority: high 우선순위 높음 🍀 feature 새로운 기능 추가
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[feat] feat email api
3 participants