Skip to content

Conversation

@minwoo1999
Copy link
Member

@minwoo1999 minwoo1999 commented Jul 23, 2025

🔗 관련 이슈


📘 작업 유형

  • ✨ Feature (기능 추가)

  • 🐞 Bugfix (버그 수정)


📙 작업 내역

이번 PR은 사용자의 약관 동의 상태를 관리하는 새로운 기능을 추가하고, 기존 BaseTimeEntitylateinit 오류를 해결합니다.

  • API 계층 (apis 모듈):

    • 사용자의 약관 동의 상태를 업데이트하는 새로운 PUT /api/v1/auth/terms-agreement 엔드포인트를 추가했습니다.

    • UserProfileResponsetermsAgreed 필드를 추가하여 약관 동의 여부를 응답에 포함하도록 수정했습니다.

    • 약관 동의 상태 업데이트 요청을 위한 TermsAgreementRequest DTO를 정의했습니다.

    • AuthControllerUserAuthService에 약관 동의 업데이트 및 사용자 프로필 조회 시 약관 동의 상태를 처리하는 로직을 구현했습니다.

  • 도메인 계층 (domain 모듈):

    • User 도메인 엔티티에 termsAgreed 불리언 필드를 추가하고, 해당 필드를 업데이트하는 updateTermsAgreement 메서드를 구현했습니다.

    • UserProfileVOtermsAgreed 필드를 반영하여 사용자 프로필 정보에 약관 동의 여부가 포함되도록 했습니다.

    • UserDomainService에 사용자의 약관 동의 상태를 업데이트하고 영속화하는 로직을 추가했습니다.

  • 인프라 계층 (infra 모듈):

    • 데이터베이스의 UserEntityterms_agreed 컬럼을 추가했습니다.

    • BaseTimeEntity에서 createdAtupdatedAt 필드의 lateinit 오류를 해결하기 위해 초기값을 직접 할당하여, 객체 생성 시 항상 유효한 값이 설정되도록 했습니다.


🧪 테스트 내역

  • 브라우저/기기에서 동작 확인 (API 테스트 도구 사용)

  • 엣지 케이스 테스트 완료 (예: 약관 동의 요청 시 값이 null이거나 유효하지 않은 경우)

  • 기존 기능 영향 없음 (기존 사용자 프로필 조회 및 인증/인가 흐름 정상 작동 확인)


🎨 스크린샷 또는 시연 영상 (선택)

기능 | 미리보기 | 기능 | 미리보기 -- | -- | -- | -- 약관 동의 API 호출 예시 |   | 업데이트된 유저 프로필 조회 |  
Sheets로 내보내기

✅ PR 체크리스트

  • 커밋 메시지가 명확합니다

  • PR 제목이 컨벤션에 맞습니다

  • 관련 이슈 번호를 작성했습니다

  • 기능이 정상적으로 작동합니다

  • 불필요한 코드를 제거했습니다


💬 추가 설명 or 리뷰 포인트 (선택)

이번 변경 사항을 통해 서비스 약관 동의 여부를 명확히 관리할 수 있게 되었으며, 법적 준수 사항에도 도움이 될 것입니다. BaseTimeEntity 수정은 애플리케이션의 안정성을 높이는 중요한 개선 사항입니다. 특히, 새로 추가된 API 엔드포인트의 보안 및 예외 처리 로직, 그리고 도메인 계층에서의 비즈니스 로직을 중점적으로 검토해주시면 감사하겠습니다.

Summary by CodeRabbit

  • 신규 기능

    • 사용자의 서비스 약관 동의 상태를 업데이트할 수 있는 API 엔드포인트가 추가되었습니다.
    • 사용자 프로필 응답에 약관 동의 여부(termsAgreed) 정보가 포함됩니다.
  • 버그 수정

    • 없음
  • 리팩터링

    • 일부 서비스 및 요청/응답 객체에서 필드 접근 및 검증 방식이 개선되었습니다.
    • 도메인 및 엔티티 모델에 약관 동의 상태 필드가 추가되어 일관성 있게 관리됩니다.
  • 스타일

    • 함수 구현 방식이 블록 형태로 변경되어 코드 가독성이 향상되었습니다.
  • 기타

    • 생성 및 수정 일시 필드의 초기화 방식이 개선되었습니다.

@coderabbitai
Copy link

coderabbitai bot commented Jul 23, 2025

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

📥 Commits

Reviewing files that changed from the base of the PR and between 6ed277f and 10cd08f.

📒 Files selected for processing (2)
  • apis/src/main/kotlin/org/yapp/apis/book/dto/request/UpsertUserBookRequest.kt (1 hunks)
  • apis/src/main/kotlin/org/yapp/apis/book/service/UserBookService.kt (3 hunks)
 __________________________________________________________________________________________________________________
< 🎵 Bugs, so boring, they've got me snoring... Bugs, so bad, they're driving me mad! Bugs, no fun, I am so done! 🎵 >
 ------------------------------------------------------------------------------------------------------------------
  \
   \   (\__/)
       (•ㅅ•)
       /   づ
📝 Walkthrough

"""

Walkthrough

사용자의 약관 동의 상태를 저장 및 갱신하는 API가 추가되었습니다. 이를 위해 도메인, 인프라, DTO, 서비스, 컨트롤러 계층에 termsAgreed 필드 및 관련 메서드가 일괄적으로 도입·확장되었습니다. 약관 동의 상태를 변경하는 PUT 엔드포인트가 신설되었습니다.

Changes

파일/경로 그룹 변경 요약
AuthController.kt, AuthControllerApi.kt, AuthUseCase.kt, UserAuthService.kt, UserDomainService.kt 약관 동의 상태 업데이트를 위한 엔드포인트, 서비스, 유스케이스, 도메인 서비스 메서드 추가
TermsAgreementRequest.kt 약관 동의 요청 DTO 신설, 필수 Boolean 필드 및 검증 메서드 포함
UserProfileResponse.kt, UserProfileVO.kt 약관 동의 상태(termsAgreed) 필드 추가 및 매핑 로직 확장
User.kt, UserEntity.kt 도메인 및 엔티티에 termsAgreed 필드 추가, 생성/재구성/업데이트 로직 확장
BaseTimeEntity.kt createdAt, updatedAt 필드 초기화 방식 변경 (lateinit → 기본값 현재시각)
UserBookService.kt, UserBookDomainService.kt 함수 본문 명시적 블록화 및 중간 변수 도입 (기능 변화 없음)

Sequence Diagram(s)

sequenceDiagram
    participant Client
    participant AuthController
    participant AuthUseCase
    participant UserAuthService
    participant UserDomainService
    participant UserRepository
    participant UserEntity

    Client->>AuthController: PUT /api/v1/auth/terms-agreement (TermsAgreementRequest)
    AuthController->>AuthUseCase: updateTermsAgreement(userId, termsAgreed)
    AuthUseCase->>UserAuthService: updateTermsAgreement(userId, termsAgreed)
    UserAuthService->>UserDomainService: updateTermsAgreement(userId, termsAgreed)
    UserDomainService->>UserRepository: findById(userId)
    UserRepository-->>UserDomainService: UserEntity
    UserDomainService->>UserEntity: update termsAgreed
    UserDomainService->>UserRepository: save(UserEntity)
    UserDomainService-->>UserAuthService: UserProfileVO
    UserAuthService-->>AuthUseCase: UserProfileResponse
    AuthUseCase-->>AuthController: UserProfileResponse
    AuthController-->>Client: 200 OK (UserProfileResponse)
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~45 minutes

Suggested labels

🔨 refactor

Suggested reviewers

  • hoonyworld
    """

Tip

CodeRabbit can enforce grammar and style rules using `languagetool`.

Configure languagetool in your project's settings in CodeRabbit enable/disable rules and categories. Refer to the LanguageTool Community to learn more.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch BOOK-162-feature/#50

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between beff1d0 and a547b7e.

📒 Files selected for processing (13)
  • apis/src/main/kotlin/org/yapp/apis/auth/controller/AuthController.kt (2 hunks)
  • apis/src/main/kotlin/org/yapp/apis/auth/controller/AuthControllerApi.kt (2 hunks)
  • apis/src/main/kotlin/org/yapp/apis/auth/dto/request/TermsAgreementRequest.kt (1 hunks)
  • apis/src/main/kotlin/org/yapp/apis/auth/dto/response/UserProfileResponse.kt (1 hunks)
  • apis/src/main/kotlin/org/yapp/apis/auth/service/UserAuthService.kt (1 hunks)
  • apis/src/main/kotlin/org/yapp/apis/auth/usecase/AuthUseCase.kt (1 hunks)
  • apis/src/main/kotlin/org/yapp/apis/book/service/UserBookService.kt (3 hunks)
  • domain/src/main/kotlin/org/yapp/domain/user/User.kt (7 hunks)
  • domain/src/main/kotlin/org/yapp/domain/user/UserDomainService.kt (1 hunks)
  • domain/src/main/kotlin/org/yapp/domain/user/vo/UserProfileVO.kt (2 hunks)
  • domain/src/main/kotlin/org/yapp/domain/userbook/UserBookDomainService.kt (2 hunks)
  • infra/src/main/kotlin/org/yapp/infra/common/BaseTimeEntity.kt (1 hunks)
  • infra/src/main/kotlin/org/yapp/infra/user/entity/UserEntity.kt (4 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: build-validation
🔇 Additional comments (24)
apis/src/main/kotlin/org/yapp/apis/auth/usecase/AuthUseCase.kt (1)

58-61: 새로운 약관 동의 업데이트 메서드가 올바르게 구현되었습니다.

트랜잭션 어노테이션이 적절히 적용되었고, 서비스 계층으로의 위임이 깔끔하게 처리되었습니다. 기존 메서드들과 일관된 패턴을 따르고 있습니다.

apis/src/main/kotlin/org/yapp/apis/book/service/UserBookService.kt (3)

21-32: 메서드 본문 리팩터링이 적절히 수행되었습니다.

단일 표현식 함수에서 명시적인 블록 본문으로 변경하여 코드 가독성과 디버깅 편의성이 향상되었습니다. 기능적 동작은 동일하게 유지됩니다.


42-47: 일관된 코드 스타일로 리팩터링되었습니다.

중간 변수를 사용한 명시적 매핑 방식으로 변경하여 코드의 명확성이 개선되었습니다.


55-57: 매핑 로직이 명확하게 개선되었습니다.

페이지 결과를 중간 변수에 할당한 후 매핑하는 방식으로 변경하여 코드 가독성이 향상되었습니다.

domain/src/main/kotlin/org/yapp/domain/userbook/UserBookDomainService.kt (3)

39-41: 매핑 스타일이 일관되게 개선되었습니다.

중간 변수와 람다 표현식을 사용한 명시적 매핑 방식으로 변경하여 코드 일관성과 가독성이 향상되었습니다.


49-51: 페이지 매핑 로직이 명확해졌습니다.

페이지 결과를 중간 변수에 할당한 후 매핑하는 방식으로 코드의 명확성이 개선되었습니다.


57-59: 컬렉션 매핑이 일관된 스타일로 개선되었습니다.

중간 변수를 활용한 명시적 매핑 방식으로 변경하여 코드베이스 전반의 일관성이 향상되었습니다.

apis/src/main/kotlin/org/yapp/apis/auth/service/UserAuthService.kt (1)

24-28: 약관 동의 업데이트 서비스 메서드가 올바르게 구현되었습니다.

사용자 존재 여부 검증을 먼저 수행한 후 도메인 서비스로 위임하는 적절한 패턴을 따르고 있습니다. 기존 서비스 메서드들과 일관된 구조를 유지합니다.

domain/src/main/kotlin/org/yapp/domain/user/UserDomainService.kt (1)

73-79: 도메인 서비스 메서드 검증 완료 및 승인

User 엔터티의 updateTermsAgreement 메서드가
domain/src/main/kotlin/org/yapp/domain/user/User.kt에 아래와 같이 올바르게 구현되어 있습니다:

fun updateTermsAgreement(termsAgreed: Boolean): User {
    return this.copy(termsAgreed = termsAgreed)
}

따라서 UserDomainService.updateTermsAgreement 구현은

  • 사용자 조회 및 예외 처리
  • 엔터티 불변성(copy) 유지
  • 저장 및 VO 변환 패턴

모두 적절히 따르고 있으므로 변경 사항을 승인합니다.

apis/src/main/kotlin/org/yapp/apis/auth/controller/AuthController.kt (2)

8-8: 새로운 DTO import가 적절하게 추가되었습니다.

TermsAgreementRequest import가 올바르게 추가되어 새로운 API 엔드포인트에서 사용할 수 있습니다.


48-55: 약관 동의 업데이트 엔드포인트가 올바르게 구현되었습니다.

PUT 메서드를 사용한 RESTful 설계가 적절하며, 인증된 사용자와 검증된 요청 본문을 받아 처리하는 구조가 좋습니다. 기존 컨트롤러 패턴과 일관성을 유지하고 있습니다.

domain/src/main/kotlin/org/yapp/domain/user/vo/UserProfileVO.kt (2)

10-11: 약관 동의 필드가 적절하게 추가되었습니다.

Boolean 타입의 termsAgreed 필드가 생성자 매개변수로 올바르게 추가되었습니다. Boolean 값은 별도의 검증이 필요하지 않으므로 현재 구현이 적절합니다.


26-27: 팩토리 메서드가 새로운 필드를 올바르게 매핑합니다.

newInstance 메서드에서 User 도메인 객체의 termsAgreed 속성을 UserProfileVO로 올바르게 매핑하고 있습니다.

apis/src/main/kotlin/org/yapp/apis/auth/dto/response/UserProfileResponse.kt (2)

38-42: Swagger 문서화가 잘 구현된 새로운 필드입니다.

termsAgreed 필드가 적절한 설명과 예시와 함께 추가되었습니다. API 문서화가 명확하여 API 사용자가 필드의 목적을 쉽게 이해할 수 있습니다.


50-51: 응답 매핑이 올바르게 구현되었습니다.

UserProfileVO에서 UserProfileResponse로의 termsAgreed 필드 매핑이 정확하게 구현되어 있습니다.

infra/src/main/kotlin/org/yapp/infra/common/BaseTimeEntity.kt (2)

17-17: lateinit 초기화 문제가 적절하게 해결되었습니다.

createdAt 필드에 기본값을 설정하여 UninitializedPropertyAccessException을 방지합니다. JPA Auditing이 실제 값을 설정하므로 이 기본값은 안전한 fallback 역할을 합니다.


22-22: updatedAt 필드의 초기화가 올바르게 수정되었습니다.

lateinit 사용을 제거하고 기본값으로 초기화하여 런타임 오류를 방지합니다. @LastModifiedDate 어노테이션이 있어 JPA Auditing이 적절한 시점에 값을 업데이트할 것입니다.

apis/src/main/kotlin/org/yapp/apis/auth/controller/AuthControllerApi.kt (2)

14-14: 새로운 import 추가가 적절합니다.

PutMappingTermsAgreementRequest import가 새로운 약관 동의 엔드포인트를 위해 올바르게 추가되었습니다.

Also applies to: 17-17


111-130: 약관 동의 업데이트 API 인터페이스가 잘 설계되었습니다.

PUT 메서드를 사용한 RESTful 설계, 적절한 OpenAPI 문서화(200, 404 응답 코드), 그리고 @Valid@AuthenticationPrincipal 어노테이션 사용이 모두 베스트 프랙티스를 따르고 있습니다.

infra/src/main/kotlin/org/yapp/infra/user/entity/UserEntity.kt (3)

40-40: 기본값 설정이 적절합니다.

약관 동의 상태의 기본값을 false로 설정한 것이 합리적입니다. 사용자는 명시적으로 동의해야 합니다.


68-68: 도메인 변환 메서드가 일관성 있게 업데이트되었습니다.

toDomain()fromDomain() 메서드 모두에서 termsAgreed 필드가 올바르게 처리되어 엔티티와 도메인 모델 간의 일관성을 유지합니다.

Also applies to: 83-83


56-58: 데이터베이스 컬럼 매핑 및 마이그레이션 검증 요청
매핑은 올바르며 terms_agreed 컬럼도 nullable = false로 설정되어 있습니다.
다만, 마이그레이션 스크립트(예: src/main/resources/db/migration 하위의 .sql, .yml, .yaml 파일)에서 기존 레코드에 대해 terms_agreed 컬럼의 기본값이 설정되었는지 수동으로 확인해주세요.

  • 마이그레이션 파일에 terms_agreed 컬럼 추가 및 기본값(default) 지정 여부 점검
domain/src/main/kotlin/org/yapp/domain/user/User.kt (2)

44-48: 불변 객체 패턴을 잘 따른 업데이트 메서드입니다.

copy() 메서드를 사용하여 불변성을 유지하면서 약관 동의 상태를 업데이트하는 것이 도메인 모델의 일관성을 보장합니다.


56-57: 팩토리 메서드들이 일관성 있게 업데이트되었습니다.

모든 팩토리 메서드(create, createWithRole, reconstruct)에서 termsAgreed 매개변수가 기본값 false와 함께 적절히 추가되어 기존 코드와의 호환성을 유지합니다.

Also applies to: 66-67, 78-79, 88-89, 101-101, 114-114

Comment on lines +7 to +13
data class TermsAgreementRequest private constructor(
@Schema(description = "Whether the user agrees to the terms of service", example = "true", required = true)
val termsAgreed: Boolean? = null


) {
fun validTermsAgreed(): Boolean = termsAgreed!!
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

null 안전성 문제와 검증 로직을 개선해야 합니다.

현재 구현에는 심각한 문제가 있습니다:

  1. termsAgreed 필드가 nullable이지만 적절한 검증 어노테이션이 없습니다
  2. validTermsAgreed() 메서드에서 !! 연산자로 강제 언래핑하면 NullPointerException이 발생할 수 있습니다

다음과 같이 수정하는 것을 권장합니다:

+import jakarta.validation.constraints.NotNull

 @Schema(description = "Request to update terms agreement status")
-data class TermsAgreementRequest private constructor(
+data class TermsAgreementRequest(
-    @Schema(description = "Whether the user agrees to the terms of service", example = "true", required = true)
-    val termsAgreed: Boolean? = null
+    @field:NotNull(message = "약관 동의 여부는 필수입니다")
+    @Schema(description = "Whether the user agrees to the terms of service", example = "true", required = true)
+    val termsAgreed: Boolean?
-
-
-) {
-    fun validTermsAgreed(): Boolean = termsAgreed!!
-}
+)

그리고 컨트롤러에서는 request.termsAgreed!! 대신 request.termsAgreed (검증이 보장되므로)를 사용하세요.

🤖 Prompt for AI Agents
In apis/src/main/kotlin/org/yapp/apis/auth/dto/request/TermsAgreementRequest.kt
around lines 7 to 13, the termsAgreed field is nullable without validation, and
validTermsAgreed() uses !! which risks NullPointerException. Fix this by making
termsAgreed non-nullable and adding appropriate validation annotations to ensure
it is always provided. Then update validTermsAgreed() to safely return the value
without forced unwrapping. Also, adjust controller code to use
request.termsAgreed directly without !! since validation guarantees non-null.

val providerType: ProviderType,
val providerId: ProviderId,
val role: Role,
val termsAgreed: Boolean = false,
Copy link

@coderabbitai coderabbitai bot Jul 23, 2025

Choose a reason for hiding this comment

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

🧹 Nitpick (assertive)

도메인 모델에 약관 동의 필드가 적절히 추가되었습니다.

기본값 false로 설정하여 명시적 동의가 필요하도록 한 것이 올바른 설계입니다.

클래스 문서화 주석(19-22줄)에 새로 추가된 termsAgreed 속성에 대한 설명을 추가하는 것을 권장합니다:

 * @property role The roles of the user (e.g., USER, ADMIN).
+* @property termsAgreed Whether the user has agreed to the terms and conditions.
 * @property createdAt The timestamp when the user was created.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
val termsAgreed: Boolean = false,
* @property role The roles of the user (e.g., USER, ADMIN).
* @property termsAgreed Whether the user has agreed to the terms and conditions.
* @property createdAt The timestamp when the user was created.
🤖 Prompt for AI Agents
In domain/src/main/kotlin/org/yapp/domain/user/User.kt at line 31, the new field
termsAgreed is correctly added with a default value of false. To complete this
update, add a description of the termsAgreed property to the class documentation
comments between lines 19 and 22, explaining its purpose as indicating whether
the user has explicitly agreed to the terms.

Copy link
Member

Choose a reason for hiding this comment

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

@minwoo1999 요거 주석 달면 좋을 거 같아요~

Copy link

Choose a reason for hiding this comment

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

Seems like the humans are having a chat. I'll hop back into my burrow for now. If you need me again, just tag @coderabbitai in a new comment, and I'll come hopping out!

@move-hoon move-hoon changed the title feat: 약관동의여부 API 기능개발 (#50) feat: 약관동의여부 API 기능개발 Jul 24, 2025
@minwoo1999 minwoo1999 force-pushed the BOOK-162-feature/#50 branch from 6ed277f to a547b7e Compare July 24, 2025 14:48
Copy link
Member

@move-hoon move-hoon left a comment

Choose a reason for hiding this comment

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

고생하셨습니다 민우님~~

사소한 부분 몇개 코멘트 남겼습니다!
로직적으로는 수정할 부분이 없는거 같아서 어푸르브 했습니다~

Comment on lines +8 to +10
@Schema(description = "Whether the user agrees to the terms of service", example = "true", required = true)
val termsAgreed: Boolean? = null

Copy link
Member

Choose a reason for hiding this comment

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

valid 로직이 빠진 것 같아요!!

Copy link
Member Author

Choose a reason for hiding this comment

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

valid validTermsAgreed() 여기있어요!!~

upsertUserBookRequest.bookCoverImageUrl,
upsertUserBookRequest.status
)
fun upsertUserBook(upsertUserBookRequest: UpsertUserBookRequest): UserBookResponse {
Copy link
Member

Choose a reason for hiding this comment

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

(사소) UpsertUserBookRequest의 필드에도 validation을 하면 좋을 것 같다는 생각이 듭니다!!

val providerType: ProviderType,
val providerId: ProviderId,
val role: Role,
val termsAgreed: Boolean = false,
Copy link
Member

Choose a reason for hiding this comment

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

@minwoo1999 요거 주석 달면 좋을 거 같아요~

@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@minwoo1999 minwoo1999 merged commit 3706fcc into develop Jul 25, 2025
1 of 3 checks passed
@move-hoon move-hoon deleted the BOOK-162-feature/#50 branch August 12, 2025 06:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BOOK-162/feat] 약관동의 여부를 확인하는 API를 작성합니다.

3 participants