summaryrefslogtreecommitdiff
path: root/lib/mix/tasks/polyjuice/login.ex
diff options
context:
space:
mode:
Diffstat (limited to 'lib/mix/tasks/polyjuice/login.ex')
-rw-r--r--lib/mix/tasks/polyjuice/login.ex6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/mix/tasks/polyjuice/login.ex b/lib/mix/tasks/polyjuice/login.ex
index 3ae1234..f485ed5 100644
--- a/lib/mix/tasks/polyjuice/login.ex
+++ b/lib/mix/tasks/polyjuice/login.ex
@@ -51,16 +51,18 @@ defmodule Mix.Tasks.Polyjuice.Login do
nil
end
- client =
+ {:ok, client_pid} =
Polyjuice.Client.start_link(
url,
storage: storage,
sync: false
)
+ client = Polyjuice.Client.get_client(client_pid)
+
ret = Polyjuice.Client.log_in_with_password(client, user_id, password)
- Polyjuice.Client.stop(client)
+ Polyjuice.Client.API.stop(client)
if storage, do: Polyjuice.Client.Storage.close(storage)