Skip to content

이메일 유효성 검증#75

Merged
reddevilmidzy merged 4 commits intomainfrom
email
May 26, 2025
Merged

이메일 유효성 검증#75
reddevilmidzy merged 4 commits intomainfrom
email

Conversation

@reddevilmidzy
Copy link
Owner

♟️ What’s this PR about?

  • api 요청에 email을 포함
  • email의 유효성 검증
  • main 에 있던 도메인을 각 하위 디렉터리로 분류하였다.
    • 이 과정에서 main_test.rs 도 좋은 자리를 찾아 이동시키게 된것 같아 기쁘다

그리고 추가로 현재 NewSubscriber가 도메인을 바로 api의 요청 파라미터로 사용하고 있는데, 이 형태가 과연 올바를지 고민해보아야 한다. 그토록 자바에서 DTO와 도메인을 분리하였는데, 러스트에선 그냥 냅다 하나로 퉁쳐버려도 될지,,,

🔗 Related Issues / PRs

close: #74

Copilot AI review requested due to automatic review settings May 26, 2025 07:21
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces email validation into the API request by incorporating a NewSubscriber domain type and refactoring repository URL validation into a dedicated module. Additionally, the PR reorganizes the domain logic by moving the repository URL validations and related tests into the domain module and removes redundant tests from main_test.rs.

  • Added NewSubscriber with email and repository URL validations.
  • Updated API handlers in main.rs to use the NewSubscriber structure.
  • Reorganized domain code and updated Cargo.toml dependencies to support the new features.

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
rook/src/main_test.rs Removed test cases now covered in the domain modules.
rook/src/main.rs Updated API endpoints to use NewSubscriber and adjusted logging accordingly.
rook/src/lib.rs Refactored module exports to include the new domain modules.
rook/src/domain/subscriber_email.rs Added a new module for SubscriberEmail with integrated email validation using the validator crate.
rook/src/domain/repository_url.rs Introduced a dedicated module for repository URL validation and updated its tests.
rook/src/domain/new_subscriber.rs Created a NewSubscriber type encapsulating email, repository URL, and branch information.
rook/src/domain/mod.rs Aggregated new domain modules.
rook/Cargo.toml Updated dependencies to include validator, fake, quickcheck, and quickcheck_macros.
Comments suppressed due to low confidence (1)

rook/src/main_test.rs:1

  • Confirm that the repository URL deserialization tests removed from main_test.rs are fully covered by the tests in rook/src/domain/repository_url.rs.
// Entire file removed

@reddevilmidzy reddevilmidzy merged commit a183d36 into main May 26, 2025
2 checks passed
@reddevilmidzy reddevilmidzy deleted the email branch May 26, 2025 07:27
@reddevilmidzy reddevilmidzy added this to the 3차 MVP 구현 milestone Jun 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

이메일 유효성 검증 validate email

2 participants