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

๐Ÿ”€ :: ๋น„๋ฐ€๋ฒˆํ˜ธ ์žฌ์„ค์ • ๊ธฐ๋Šฅ ์ถ”๊ฐ€ #297

Merged
merged 10 commits into from
Mar 14, 2024

Conversation

Umjiseung
Copy link
Contributor

๐Ÿ’ก ๊ฐœ์š”

๋“ฑ๋ก๋œ ๋น„๋ฐ€๋ฒˆํ˜ธ๋ฅผ ์žฌ์„ค์ • ํ•˜๋Š” ๊ธฐ๋Šฅ์„ ์ถ”๊ฐ€ํ•˜์˜€์Šต๋‹ˆ๋‹ค.

๐Ÿ“ƒ ์ž‘์—…๋‚ด์šฉ

  • UpdatePasswordService ์ถ”๊ฐ€
  • PasswordUpdateRequestDto ์ถ”๊ฐ€

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

๐Ÿ™‹โ€โ™‚๏ธ ์งˆ๋ฌธ์‚ฌํ•ญ

โš—๏ธ ์‚ฌ์šฉ๋ฒ•

๐ŸŽธ ๊ธฐํƒ€

@Umjiseung Umjiseung added 1๏ธโƒฃPriority: High ์šฐ์„ ์ˆœ์œ„ ์ƒ โœจ Feature ๊ธฐ๋Šฅ ๊ฐœ๋ฐœ labels Mar 13, 2024
@Umjiseung Umjiseung self-assigned this Mar 13, 2024
Comment on lines 15 to 28
fun toEntity(user: User, encodedPassword: String): User =
User(
id = user.id,
email = user.email,
password = encodedPassword,
gender = user.gender,
name = user.name,
grade = user.grade,
classNum = user.classNum,
num = user.num,
roles = user.roles,
state = user.state,
profileUrl = user.profileUrl
)
Copy link
Contributor

Choose a reason for hiding this comment

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

toEntity ๊ตณ์ด ์•ˆ ์“ฐ๊ณ  ์„œ๋น„์Šค ์ฝ”๋“œ์—์„œ named argument๋กœ ์„ ์–ธํ•˜๋ฉด ๋  ๊ฒƒ ๊ฐ™์•„์š”

Copy link
Contributor Author

Choose a reason for hiding this comment

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

8c78e9c
toEntity๋ฅผ ์‚ญ์ œํ–ˆ์Šต๋‹ˆ๋‹ค

throw PasswordMismatchException()
}

userRepository.save(passwordUpdateRequestDto.toEntity(currentUser, passwordEncoder.encode(passwordUpdateRequestDto.newPassword)))
Copy link
Contributor

Choose a reason for hiding this comment

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

passwordUpdateRequestDto.toEntity(currentUser, passwordEncoder.encode(passwordUpdateRequestDto.newPassword))๋Š” ๊ฐ€์‹œ์„ฑ์ด ๋„ˆ๋ฌด ๋–จ์–ด์ง€๋Š” ๊ฒƒ ๊ฐ™๋„ค์š” ๋ณ€์ˆ˜์— ํ•œ๋ฒˆ ๋‹ด์•„์„œ ๋ณด๊ธฐ ์ข‹๊ฒŒ ์ˆ˜์ •ํ•ด์ฃผ์„ธ์š”

Copy link
Contributor Author

Choose a reason for hiding this comment

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

8c78e9c
6067baa
toEntity๋ฅผ ์‚ญ์ œํ•˜๊ณ  ๋ณ€์ˆ˜์— ๋‹ด์•„์„œ ์ˆ˜์ •ํ•˜์˜€์Šต๋‹ˆ๋‹ค

@@ -16,7 +16,7 @@ class User(
val email: String,

@field:Size(max = 60)
val password: String,
var password: String,
Copy link
Contributor

Choose a reason for hiding this comment

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

var๋กœ ๋ฐ”๊ฟ€ ํ•„์š” ์—†์„ ๊ฒƒ ๊ฐ™์•„์š”

Copy link
Contributor Author

Choose a reason for hiding this comment

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

48dbf41
์ˆ˜์ •ํ•˜์˜€์Šต๋‹ˆ๋‹ค

@Umjiseung Umjiseung merged commit 952339b into main Mar 14, 2024
1 check passed
@Umjiseung Umjiseung deleted the 296-feature/password-reset-feature-add branch March 14, 2024 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1๏ธโƒฃPriority: High ์šฐ์„ ์ˆœ์œ„ ์ƒ โœจ Feature ๊ธฐ๋Šฅ ๊ฐœ๋ฐœ
Projects
None yet
Development

Successfully merging this pull request may close these issues.

๋น„๋ฐ€๋ฒˆํ˜ธ ์žฌ์„ค์ • ๊ธฐ๋Šฅ ์ถ”๊ฐ€
3 participants