Skip to content

Conversation

@lfoliveir4
Copy link
Contributor

@lfoliveir4 lfoliveir4 commented Feb 19, 2025

Apenas refatora e reset password view controller para separação de camadas

  • View Model
  • Também conforma com alguns nomes

success ? self.delegate?.showSuccess() : self.delegate?.showError(
"Algo de errado aconteceu. Tente novamente mais tarde."
)
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

salve salve @ppedroam !

Como a BadNetworkLayer.shared.resetPassword precisa de uma referencia pra viewModel fiquei com receio de criar a camada de service e passar uma referencia de viewController para a camada de serviço. Alguma sugestão?

Copy link
Owner

Choose a reason for hiding this comment

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

para solucionar isso deve se deixar de usar a BadNetworkLayer e começar usar os objetos da GoodNetworkLayer
image

@lfoliveir4
Copy link
Contributor Author

salve salve @ppedroam !

Acha que vale também neste PR conter as alterações de view para viewCode?

textLabel.text = "Ocorreu um erro inesperado"
}
extension LuzResetPasswordViewController: LuzResetPasswordViewModelDelegate {
func showError(_ message: String) {
Copy link
Owner

Choose a reason for hiding this comment

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

show error what? alerta? melhorar nome

return [
"email" : email
]
func showSuccess() {
Copy link
Owner

Choose a reason for hiding this comment

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

showSucces what? melhorar nome

Copy link
Owner

@ppedroam ppedroam left a comment

Choose a reason for hiding this comment

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

code review 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants