-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #164 from Team-Ampersand/feature/163_write_the_log…
…ic_find_password 🔀 :: (#163) write the logic find password
- Loading branch information
Showing
23 changed files
with
483 additions
and
254 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
data/src/main/java/com/msg/data/remote/dto/auth/ChangePasswordRequest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package com.msg.data.remote.dto.auth | ||
|
||
import com.msg.domain.model.auth.ChangePasswordRequestModel | ||
|
||
data class ChangePasswordRequest( | ||
val email: String, | ||
val newPassword: String | ||
) | ||
|
||
fun ChangePasswordRequestModel.asChangePasswordRequest() = ChangePasswordRequest( | ||
email = email, | ||
newPassword = newPassword | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
domain/src/main/java/com/msg/domain/model/auth/ChangePasswordRequestModel.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package com.msg.domain.model.auth | ||
|
||
data class ChangePasswordRequestModel( | ||
val email: String, | ||
val newPassword: String | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
domain/src/main/java/com/msg/domain/usecase/auth/ChangePasswordUseCase.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package com.msg.domain.usecase.auth | ||
|
||
import com.msg.domain.model.auth.ChangePasswordRequestModel | ||
import com.msg.domain.repository.AuthRepository | ||
import javax.inject.Inject | ||
|
||
class ChangePasswordUseCase @Inject constructor( | ||
private val repository: AuthRepository | ||
) { | ||
suspend operator fun invoke(body: ChangePasswordRequestModel) = kotlin.runCatching { repository.changePassword(body) } | ||
} |
11 changes: 11 additions & 0 deletions
11
domain/src/main/java/com/msg/domain/usecase/email/SendPasswordEmailUseCase.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package com.msg.domain.usecase.email | ||
|
||
import com.msg.domain.model.email.SendEmailRequestModel | ||
import com.msg.domain.repository.EmailRepository | ||
import javax.inject.Inject | ||
|
||
class SendPasswordEmailUseCase @Inject constructor( | ||
private val repository: EmailRepository | ||
) { | ||
suspend operator fun invoke(body: SendEmailRequestModel) = kotlin.runCatching { repository.sendPasswordEmail(body) } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.