Skip to content

Commit

Permalink
MasterApi: JSON decode before using body data
Browse files Browse the repository at this point in the history
Fixes tmate-io#7.
  • Loading branch information
pini-gh committed Mar 2, 2021
1 parent 628cd91 commit 9d27bed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/tmate/master_api.ex
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ defmodule Tmate.MasterApi do
def get_named_session_prefix(api_key) do
case get("/named_session_prefix", [], params: %{api_key: api_key}) do
{:ok, result} ->
{:ok, result["prefix"]}
{:ok, Jason.decode!(result)["prefix"]}
{:error, 404} ->
{:error, :not_found}
{:error, reason} ->
Expand Down

0 comments on commit 9d27bed

Please sign in to comment.