Skip to content
This repository has been archived by the owner on Oct 23, 2023. It is now read-only.

Commit

Permalink
refactor(access): In AccessDomainRepository, AccessDomainRepositoryIm…
Browse files Browse the repository at this point in the history
…pl and AccessUseCase rename param username into email
  • Loading branch information
AndreaBrighi committed May 4, 2023
1 parent a585da5 commit dabf8a8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ class AccessDomainRepositoryImpl(

override fun isUserLogged(): Boolean = accessLocalDataStorage.isUserSaved()

override fun loginWithData(username: String, password: String): User =
override fun loginWithData(email: String, password: String): User =
accessRemoteDataStorage
.accessWithData(username, password)
.accessWithData(email, password)
.also { accessLocalDataStorage.saveUser(it) }

override fun automaticLogin(): User =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ interface AccessDomainRepository {

fun isUserLogged(): Boolean

fun loginWithData(username: String, password: String): User
fun loginWithData(email: String, password: String): User

fun automaticLogin(): User

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class AccessUseCase(private val repository: AccessDomainRepository) {

suspend fun isUserLogged() = repository.isUserLogged()

suspend fun loginWithData(username: String, password: String) = repository.loginWithData(username, password)
suspend fun loginWithData(email: String, password: String) = repository.loginWithData(email, password)

suspend fun automaticLogin() = repository.automaticLogin()

Expand Down

0 comments on commit dabf8a8

Please sign in to comment.