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

[FIX] 추천장소리스트 API 옵셔널 처리 (#26) #30

Merged
merged 10 commits into from
Feb 16, 2025
Merged

Conversation

yurim830
Copy link
Collaborator

🐿️ Pull Requests

🪵 작업 브랜치

🥔 작업 내용

  • 추천장소리스트 DTO, Model에서 필수가 아닌 필드를 Optional 타입으로 변경했습니다.
  • DTO에서 nil일 때는 encoding하지 않도록 설정했습니다.
  • SpotListFilterModel에서 사용하지 않는 모델을 삭제하고, SpotFilterList -> SpotFilter로 이름을 변경했습니다.

💥 To be sure

  • 모든 뷰가 잘 실행되는지 다시 한 번 체크해주세요 !

🌰 Resolve issue

@yurim830 yurim830 added ❤️‍🩹 bug 버그수정 🍀 refactor 리팩토링 🥑 유림 유림 labels Feb 15, 2025
@yurim830 yurim830 added this to the Sprint-2 milestone Feb 15, 2025
@yurim830 yurim830 self-assigned this Feb 15, 2025
Copy link
Contributor

@cirtuare cirtuare 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 41 to 45
var walkingTime: SpotType.WalkingDistanceType = .fifteen

var restaurantPrice: SpotType.RestaurantPriceType = .aboveFiftyThousand
var restaurantPrice: SpotType.RestaurantPriceType = .aboveFiftyThousand // TODO: 옵셔널로 변경

var cafePrice: SpotType.CafePriceType = .aboveTenThousand
var cafePrice: SpotType.CafePriceType = .aboveTenThousand // TODO: 옵셔널로 변경
Copy link
Contributor

Choose a reason for hiding this comment

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

🐿️
위에서 새롭게 선언한 default value 사용해주면 될 것 같아요 !

Comment on lines 15 to 17
let defaultWalkingTime: SpotType.WalkingDistanceType = .fifteen
let defaultRestaurantPrice: SpotType.RestaurantPriceType = .aboveFiftyThousand
let defaultCafePrice: SpotType.CafePriceType = .aboveTenThousand
Copy link
Contributor

Choose a reason for hiding this comment

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

🐿️🐿️
이거 그냥 SpotType에 있는 각각의 enum에 static let default: Self = .fifteen로 선언해서 사용하는 건 어떨까요?(불러올 때 SpotType.CafePriceType.default) 이 방법이 아니더라도 default 값 구조체를 만든다던지 해서 구조화하면 좋을 것 같습니다.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

오 굿아이디어~~ 감사해용

@yurim830 yurim830 merged commit 3340906 into develop Feb 16, 2025
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.

[FIX] 추천장소리스트 API 옵셔널 처리
2 participants