diff --git a/lib/chronoscope/gemini/response.ex b/lib/chronoscope/gemini/response.ex index 5b70843..f1e4320 100644 --- a/lib/chronoscope/gemini/response.ex +++ b/lib/chronoscope/gemini/response.ex @@ -1,5 +1,5 @@ defmodule Chronoscope.Gemini.Response do - @response_pattern ~r/^(?[0-9]{2}) (?.+)\r\n(?(?s:.)*)/ + @response_pattern ~r/^(?[0-9]{2}) (?.+)\r\n(?(?s:.)*)/ def parse(response) do response @@ -14,7 +14,7 @@ defmodule Chronoscope.Gemini.Response do match -> match - |> Map.update!("status", &String.to_integer/1) + |> Map.update!("status_code", &String.to_integer/1) |> to_atom_keys() |> then(&{:ok, &1}) end diff --git a/lib/chronoscope_web/controllers/api/v1/gemini/connection_controller.ex b/lib/chronoscope_web/controllers/api/v1/gemini/connection_controller.ex index 7d77324..2448ce4 100644 --- a/lib/chronoscope_web/controllers/api/v1/gemini/connection_controller.ex +++ b/lib/chronoscope_web/controllers/api/v1/gemini/connection_controller.ex @@ -61,7 +61,7 @@ defmodule ChronoscopeWeb.API.V1.Gemini.ConnectionController do end defp format_response(response) do - Map.take(response, [:status, :mime_type, :body, :cert_expiration]) + Map.take(response, [:status_code, :meta, :body, :cert_expiration]) end defp bad_request_response(conn, message) do