Skip to content

Commit

Permalink
๐Ÿ”€ :: (#644) ๋น„๋ฐ€๋ฒˆํ˜ธ ์žฌ์„ค์ • ๊ตฌํ˜„
Browse files Browse the repository at this point in the history
๐Ÿ”€ :: (#644) ๋น„๋ฐ€๋ฒˆํ˜ธ ์žฌ์„ค์ • ๊ตฌํ˜„
  • Loading branch information
chlgkdms authored Mar 14, 2024
2 parents 80b6312 + 017799c commit ea79ba8
Show file tree
Hide file tree
Showing 13 changed files with 773 additions and 669 deletions.
9 changes: 9 additions & 0 deletions app/src/main/java/team/aliens/dms/android/app/DmsApp.kt
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ import team.aliens.dms.android.app.navigation.unauthorized.UnauthorizedNavGraph
import team.aliens.dms.android.feature.destinations.TermsScreenDestination
import team.aliens.dms.android.feature.editpassword.EditPasswordViewModel
import team.aliens.dms.android.feature.editpassword.navigation.EditPasswordNavGraph
import team.aliens.dms.android.feature.resetpassword.ResetPasswordViewModel
import team.aliens.dms.android.feature.resetpassword.navigation.ResetPasswordNavGraph
import team.aliens.dms.android.feature.signup.SignUpViewModel
import team.aliens.dms.android.feature.signup.TermsUrl
import team.aliens.dms.android.feature.signup.navigation.SignUpNavGraph
Expand Down Expand Up @@ -70,6 +72,13 @@ fun DmsApp(
}
hiltViewModel<EditPasswordViewModel>(parentEntry)
}

dependency(ResetPasswordNavGraph) {
val parentEntry = remember(navBackStackEntry) {
navController.getBackStackEntry(ResetPasswordNavGraph.route)
}
hiltViewModel<ResetPasswordViewModel>(parentEntry)
}
},
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,11 @@ class DmsNavigator(
}

override fun openResetPasswordEnterEmailVerificationCode() {
navController.navigateSingleTop(ResetPasswordEnterEmailVerificationCodeScreenDestination within navGraph)
navController.navigateSingleTop(ResetPasswordEnterEmailVerificationCodeScreenDestination within ResetPasswordNavGraph)
}

override fun openResetPasswordSetPassword() {
navController.navigateSingleTop(ResetPasswordSetPasswordScreenDestination within navGraph)
navController.navigateSingleTop(ResetPasswordSetPasswordScreenDestination within ResetPasswordNavGraph)
}

override fun openAuthorizedNav() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,10 @@ internal class AuthRepositoryImpl @Inject constructor(
)
}

override suspend fun checkIdExists(accountId: String): HashedEmail {
TODO("Not yet implemented")
}
override suspend fun checkIdExists(accountId: String): HashedEmail =
networkAuthDataSource.checkIdExists(
accountId = accountId,
).email

override suspend fun signOut() {
jwtProvider.clearCaches()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ import team.aliens.dms.android.data.student.mapper.toModel
import team.aliens.dms.android.data.student.model.HashedEmail
import team.aliens.dms.android.data.student.model.MyPage
import team.aliens.dms.android.data.student.model.StudentName
import team.aliens.dms.android.network.auth.datasource.NetworkAuthDataSource
import team.aliens.dms.android.network.student.datasource.NetworkStudentDataSource
import team.aliens.dms.android.network.student.model.ResetPasswordRequest
import team.aliens.dms.android.network.student.model.SignUpRequest
import team.aliens.dms.android.network.student.model.SignUpResponse
import team.aliens.dms.android.network.student.model.extractFeatures
Expand Down Expand Up @@ -82,7 +84,15 @@ internal class StudentRepositoryImpl @Inject constructor(
emailVerificationCode: String,
newPassword: String,
) {
TODO("Not yet implemented")
networkStudentDataSource.resetPassword(
ResetPasswordRequest(
accountId = accountId,
studentName = studentName,
email = email,
emailVerificationCode = emailVerificationCode,
newPassword = newPassword,
),
)
}

override suspend fun checkIdDuplication(id: String) {
Expand Down
Loading

0 comments on commit ea79ba8

Please sign in to comment.