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

๐Ÿš€ ๋‚ ์งœ ์ถœ๋ ฅ ํ˜•ํƒœ ๋ณ€๊ฒฝ #78

Open
wants to merge 8 commits into
base: feature
Choose a base branch
from

Conversation

shoeone96
Copy link
Contributor

๐ŸŽซ ๊ด€๋ จ ์ด์Šˆ

๐Ÿš€ ์ฃผ์š” ๋ณ€๊ฒฝ์‚ฌํ•ญ

ํ˜„์žฌ ์ถœ๋ ฅ ํ˜•ํƒœ: 1999,01,01
์›ํ•˜๋Š” ์ถœ๋ ฅ ํ˜•ํƒœ: 1999-01-01

DateValidator์— ๋ฉ”์„œ๋“œ๋ฅผ ์ถ”๊ฐ€ํ•˜์—ฌ ๋ณ€๊ฒฝ ๋ฐ format ๊ฒ€์‚ฌ ์ง„ํ–‰

๐Ÿ’ก ๊ธฐํƒ€์‚ฌํ•ญ

@shoeone96 shoeone96 added โš™๏ธย Refactoring ์ด์‚ฌ๊ฐˆ ์‹œ๊ฐ„ ๐Ÿ• ์ง„๋„๊ฐœ ํ•˜๋‚˜! ๋งŽ์ด ๊ธ‰ํ•จ!!!!! (1์ผ ๋‚ด ๋ฆฌ๋ทฐ) labels Mar 9, 2024
@shoeone96 shoeone96 self-assigned this Mar 9, 2024
@shoeone96 shoeone96 requested a review from a team as a code owner March 9, 2024 04:51
@shoeone96 shoeone96 requested review from ASak1104 and IjjS and removed request for a team March 9, 2024 04:51
Copy link

github-actions bot commented Mar 9, 2024

๐Ÿ“‘ Jacoco ํ…Œ์ŠคํŠธ ๊ฒฐ๊ณผ

Overall Project 73.26% -0.23% ๐Ÿ
Files changed 89.47% ๐Ÿ

File Coverage
UserErrorCode.java 100% ๐Ÿ
User.java 100% ๐Ÿ
InfoResponse.java 100% ๐Ÿ
UserValidator.java 93.55% ๐Ÿ
UserService.java 87.77% ๐Ÿ
DateValidator.java 70.97% -19.35% ๐Ÿ
UserController.java 0% -17.65% โŒ

Copy link
Contributor

@IjjS IjjS left a comment

Choose a reason for hiding this comment

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

์ด๊ฑฐ ์•„๋งˆ WebMvcConfig.java์— ์‹ค์ˆ˜๋กœ @EnableWebMvc๋•Œ๋ฌธ์ผ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค. ํ•ด๋‹น ์• ๋„ˆํ…Œ์ด์…˜์„ ์ง€์šฐ๊ณ  ๋‹ค์‹œ ํ•ด๋ณด์‹ค ์ˆ˜ ์žˆ๋‚˜์š”??

Copy link
Contributor

@ASak1104 ASak1104 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 +16 to 24
public static LocalDate parseToDate(String date, ErrorCode errorCode) {
notMatching(date, DATE_FORMAT, errorCode);

DateTimeFormatter formatter = DateTimeFormatter.ofPattern(DATE_PATTERN);

try {
return LocalDate.parse(date, formatter);
} catch (DateTimeParseException e) {
throw new BadRequestException(errorCode);
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

date๋ฅผ ๋ฐ›์•„์„œ localDate ๋กœ ๋‚ด๋ณด๋‚ด์„œ ๊ทธ๋Ÿฐ์ง€ parseToDate ๋ฉ”์„œ๋“œ ๋ช…์ด ์กฐ๊ธˆ ์–ด์ƒ‰ํ•œ ๊ฒƒ ๊ฐ™์€๋ฐ์š”?

Comment on lines +12 to 21
public record InfoResponse(
Long userId,
String nickname,
String profileImg,
Integer height,
Integer weight,
LocalDate birthDate,
String birthDate,
Sex sex,
ExerciseIntensity exerciseIntensity
) {
Copy link
Contributor

Choose a reason for hiding this comment

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

์ด๊ฒƒ๋„ swagger ์ƒ๊ฐ์„ ํ•ด๋ณด๋ฉด ์–ด๋–ป๊ฒŒ ๊ตฌ์ฒด์ ์œผ๋กœ ์ ์„ ์ˆ˜ ์žˆ์„ ์ง€ ๊ณ ๋ฏผํ•ด๋ด์•ผ๊ฒ ๋„ค์š”

Comment on lines +26 to +32
public static String parseToString(LocalDate date, ErrorCode errorCode) {
try {
return date.format(formatter);
} catch (DateTimeParseException e) {
throw new BaseException(errorCode);
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Validator๊ฐ€ parse๋ฅผ ํ•˜๋„๋ก ์ฑ…์ž„์„ ๋ถ€์—ฌํ•ด๋„ ๋  ์ง€ ์ƒ๊ฐํ•ด๋ด์•ผ ํ•  ๊ฒƒ ๊ฐ™์•„์š”

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
โš™๏ธย Refactoring ์ด์‚ฌ๊ฐˆ ์‹œ๊ฐ„ ๐Ÿ• ์ง„๋„๊ฐœ ํ•˜๋‚˜! ๋งŽ์ด ๊ธ‰ํ•จ!!!!! (1์ผ ๋‚ด ๋ฆฌ๋ทฐ)
Projects
Status: No status
3 participants