Skip to content

Feat/54 정책, 클라이언트 settings 정보 조회 api 구축#55

Merged
jinwon1234 merged 18 commits intomainfrom
feat/54-settings
Mar 29, 2026
Merged

Feat/54 정책, 클라이언트 settings 정보 조회 api 구축#55
jinwon1234 merged 18 commits intomainfrom
feat/54-settings

Conversation

@sinsehwan
Copy link
Copy Markdown
Collaborator

@sinsehwan sinsehwan commented Mar 24, 2026

변경점 👍

  • GET /api/users/init-settings : 클라이언트(Android, IOS)에 맞는 버전 충족 여부, 필수 약관 동의 여부 및 초기 태그 설정 여부 조회
  • POST /api/users/policy-agreement : 약관 동의 api
  • 약관 종류는 enum인 PolicyType으로 관리하고 revision으로 약관 버전을 관리해서 필요 시 재동의 유도하도록 구성했습니다.
  • 기존 유저는 tag값을 변경할 필요가 없기에 앞으로 신규 유저들만 UserInitSettingEntity를 만들어서 tag 설정 여부를 확인합니다.

비고 ✏

  • 현재는 figma 상 보이는 2개의 약관만 정의해두었고, 필요 시 enum 값 추가 가능합니다.
  • 현재는 클라이언트 최소요구버전, 최신버전 모두 1.0.0으로 둬서 needsOptionalUpdate, needsForseUpdate 모두 항상 false 입니다.

@sinsehwan sinsehwan changed the title Feat/54 settings Feat/54 정책, 클라이언트 settings 정보 조회 api 구축 Mar 24, 2026
Copy link
Copy Markdown
Collaborator

@jinwon1234 jinwon1234 left a comment

Choose a reason for hiding this comment

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

고생하셨습니다~ 몇가지 질문이있는데 확인해주세요!

@NotNull(message = "약관 동의 목록은 필수입니다.")
List<AgreementItem> agreements
) {
public record AgreementItem(
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

오.. 굳이 내부에 둬야하는 이유가 있을까요??

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

음 이유는 딱히 없어요 단일 객체로도 쓰이는 것 같아서 AgreementItem 별도로 파일 분리하는 게 더 낫겠네요

private final UserInitSettingRepository initSettingRepository;

@Transactional(readOnly = true)
public InitSettingsResponse getInitSettings(Long userId) {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

오우.. 혹시 이거 작업 흐름에 대해서 설명해주실 수 있나요?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

api가 init_settings라서 여기에 dto 만드는 것 까지 다 담당하는 형식으로 했었는데 직관적이지가 않네요 앱 버전이랑 약관 따로 가져와서 controller에서 호출해서 조합하는 형태로 바꿔볼게요

@sinsehwan
Copy link
Copy Markdown
Collaborator Author

조금 더 직관적으로 리팩토링 해봤습니다!

Copy link
Copy Markdown
Collaborator

@jinwon1234 jinwon1234 left a comment

Choose a reason for hiding this comment

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

훨씬 깔끔해졌네요! 고생하셨습니다!

@jinwon1234 jinwon1234 merged commit c6a85c3 into main Mar 29, 2026
@sinsehwan sinsehwan self-assigned this Apr 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants