-
Notifications
You must be signed in to change notification settings - Fork 0
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] GPS-코드 변환 API, 동네 인증 API 개발 #78
Conversation
… 로직, 동네 인증 요청 처리 로직 구현
Test Results0 tests 0 ✅ 0s ⏱️ Results for commit 131b3aa. ♻️ This comment has been updated with latest results. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍🏻
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍🏻
|
mediaType = "application/json", | ||
schema = @Schema(implementation = ErrorResponse.class), | ||
examples = @ExampleObject(name = "E080101", value = SwaggerGeoErrorExamples.INVALID_SERVICE_REGION))), | ||
@ApiResponse(responseCode = "401", description = "동네 인증 권한이 없음", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
보통 401은 아예 인증을 받지 않은 유저 (유저 정보 없음, 로그인 안함) 에 관한 상태코드인데 이 의미 맞나요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
리뷰 확인해주세요! 👍🏻
|
||
private final GeoService geoService; | ||
|
||
@PostMapping("/areacode") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
위도 경도 데이터는 사용자 위치에 대한 정보기는 하지만 파라미터 공개가 사용자에게만 이루어지니까 Get에서 쿼리로 받는거도 괜찮을 것 같다는 생각이듭니다!
private int validateCoordinatesCoverage(Double x, Double y) { | ||
int areaCode = getAreaCodeAboutCoordinates(x, y); | ||
validateCodeCoverage(areaCode); | ||
return areaCode; | ||
} | ||
|
||
private void validateCodeCoverage(int areaCode) { | ||
if (Region.getByAreaCode(areaCode) == null) { | ||
throw new GeoException(INVALID_SERVICE_REGION); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
private 메서드들은 public 메서드 이하에 위치하면 좋을 것 같습니다! 👍🏻
|
||
private final CertService certService; | ||
|
||
@PostMapping("/certificate") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Microsoft의 웹 API 디자인 모범 사례 - HTTP 메서드 측면에서 API 작업 정의에 따르면 지정된 URI에 리소스를 대체하는 용도로 PUT
메서드를 사용하는 방식을 제안하는데 이에 대한 생각은 어떠신가요?
🚀 개발 사항
이슈 번호
특이 사항 🫶