Ejemplo n.º 1
0
        public async Task <IActionResult> UpdateUserInfo(
            [FromServices] IUpdateUserUseCase useCase,
            [FromServices] UpdateUserPresenter presenter,
            [FromBody] InputUserDto input)
        {
            await useCase.Execute(new UpdateUserInput(
                                      input.Name,
                                      input.Surname,
                                      input.Email,
                                      input.Password));

            return(presenter.ViewModel);
        }
Ejemplo n.º 2
0
 public ManageUserUseCase(
     ICreateUserUseCase createUserUseCase,
     IReadUserUseCase readUserUseCase,
     IUpdateUserUseCase updateUserUseCase,
     IChangeUsersStatusUseCase changeUsersStatusUseCase,
     IDeleteUserUseCase deleteUserUseCase
     )
 {
     _createUserUseCase        = createUserUseCase;
     _readUserUseCase          = readUserUseCase;
     _updateUserUseCase        = updateUserUseCase;
     _changeUsersStatusUseCase = changeUsersStatusUseCase;
     _deleteUserUseCase        = deleteUserUseCase;
 }
Ejemplo n.º 3
0
 public UserController(
     IGetAllUserUseCase getAllUserUseCase,
     IGetOneUserUseCase getOneUserUseCase,
     IAddUserUseCase addUserUseCase,
     IUpdateUserUseCase updateUserUseCase,
     IResetPasswordUseCase resetPasswordUseCase,
     IUserRepository userRepository
     )
 {
     _getAllUserUseCase    = getAllUserUseCase;
     _getOneUserUseCase    = getOneUserUseCase;
     _addUserUseCase       = addUserUseCase;
     _updateUserUseCase    = updateUserUseCase;
     _resetPasswordUseCase = resetPasswordUseCase;
     _userRepository       = userRepository;
 }
Ejemplo n.º 4
0
 public UserController(
     IAddUserUseCase addUserUseCase,
     IRemoveUserUseCase removeUserUseCase,
     IUpdateUserUseCase updateUserUseCase,
     IGetAllUserUseCase getAllUserUseCase,
     IGetByIdUserUseCase getByIdUserUseCase,
     IGetByNameUser getByNameUser,
     ITokenRepository tokenRepository)
 {
     this.addUserUseCase     = addUserUseCase;
     this.removeUserUseCase  = removeUserUseCase;
     this.updateUserUseCase  = updateUserUseCase;
     this.getAllUserUseCase  = getAllUserUseCase;
     this.getByIdUserUseCase = getByIdUserUseCase;
     this.getByNameUser      = getByNameUser;
     this.tokenRepository    = tokenRepository;
 }
Ejemplo n.º 5
0
 public UpdateUserController(IUpdateUserUseCase updateUserUseCase, IUpdateUserPresenter updateUserPresenter)
 {
     _updateUserUseCase   = updateUserUseCase;
     _updateUserPresenter = updateUserPresenter;
 }