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: Discord Webhook 통신 구현 #56

Merged
merged 1 commit into from
Dec 13, 2024
Merged

feat: Discord Webhook 통신 구현 #56

merged 1 commit into from
Dec 13, 2024

Conversation

yunn23
Copy link
Collaborator

@yunn23 yunn23 commented Dec 13, 2024

🎟️ Related Ticket: #55

✏️ Description

  • 디스코드 알림 기능을 구현하기 위해 Discord Webhook URL 통신을 추가하였습니다.

🧩 How

  • 회원가입 페이지에서 Discord Webhook URL 필드를 추가하였습니다.

⚠️ PR 참고 사항

X

📸 Screen Shot

image

✅� Todo Check

  • Discord Webhook 통신 구현

💬�리뷰 요구사항

  • X

Etc.

@yunn23 yunn23 added ticket 티켓 이슈 feat 기능 구현 labels Dec 13, 2024
@yunn23 yunn23 added this to the 정서윤 milestone Dec 13, 2024
@yunn23 yunn23 self-assigned this Dec 13, 2024
Copy link

cr-gpt bot commented Dec 13, 2024

Seems you are using me but didn't get OPENAI_API_KEY seted in Variables/Secrets for this repo. you could follow readme for more information

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Code review by ChatGPT

const response = await axiosInstance.post('/auth/register', {
email,
password,
nickname
nickname,
discord
})
return response.data
}

Choose a reason for hiding this comment

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

함수 postRegister가 수정되어서 discord라는 추가적인 속성을 인자로 받도록 변경되었습니다. 이 변경은 인터페이스 postRegisterProps에 discord 속성을 추가하여 반영되었습니다. 그러나 기존 코드의 에러는 종종 간과되며 누락될 수 있습니다. 따라서 discord 속성을 지정한 경우 오류가 발생할 수 있습니다. 따라서 변경된 함수 내에서 discord 속성을 사용하기 전에 discord 속성이 null 또는 undefined인지 확인하는 방어적 코딩의 추가가 필요합니다. 또한 axiosInstance.post 호출 후 응답을 처리하기 전에 응답에 대한 오류 처리를 추가하는 것이 좋습니다. 마지막으로 코드 리뷰 후에는 단위 테스트를 통해 변경된 로직이 예상대로 작동하는지 확인하는 것이 좋습니다.

@@ -196,7 +216,7 @@ const InputWrapper = styled.div`
`

const Label = styled.div`
width: 5.5rem;
width: 5.7rem;
margin-right: 2rem;
`

Choose a reason for hiding this comment

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

변경 사항:

  1. discord 상태 값 및 입력 핸들러를 추가하여 디스코드 Webhook URL을 수집할 수 있도록 지원
  2. discord 상태 값에 대한 유효성 검사를 수행하고 오류 메시지를 표시하여 사용자가 올바른 값을 입력하도록 유도
  3. 디스코드 URL 입력란을 UI에 추가하여 사용자가 입력할 수 있도록 함
  4. 디스코드 URL 입력란에 대한 오류 메시지를 출력하고 올바른 형식의 입력을 유도
  5. Label 스타일의 너비를 조정하여 디자인을 더 균형있게 수정함

개선점:

  1. 디스코드 URL 입력란에 대한 입력값이 올바른 형식인지 검증하는 추가적인 유효성 검사를 구현할 수 있음
  2. 코드 내에 주석을 추가하여 각 부분의 역할과 기능을 명확히 설명할 수 있음
  3. 중복되는 CSS 속성을 최적화하여 코드를 더 간결하게 유지할 수 있음.

@yunn23 yunn23 merged commit 5427b09 into develop Dec 13, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat 기능 구현 ticket 티켓 이슈
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

1 participant