From 20e32cb59481dc8a9ec6b2867e4eb205c2a49a57 Mon Sep 17 00:00:00 2001 From: Ashlynne Mitchell Date: Wed, 22 Apr 2026 16:48:21 +1000 Subject: [PATCH] refactor(config): rename is_localhost/0 to localhost?/0 per Elixir boolean naming convention --- lib/atex/config/oauth.ex | 6 +++--- lib/atex/oauth/flow.ex | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/atex/config/oauth.ex b/lib/atex/config/oauth.ex index 024b7f1..1aed81a 100644 --- a/lib/atex/config/oauth.ex +++ b/lib/atex/config/oauth.ex @@ -42,8 +42,8 @@ defmodule Atex.Config.OAuth do @doc """ Returns whether OAuth should be put into the localhost loopback mode. """ - @spec is_localhost() :: boolean() - def is_localhost() do + @spec localhost?() :: boolean() + def localhost?() do Keyword.get(Application.get_env(:atex, Atex.OAuth, []), :is_localhost, false) end @@ -56,7 +56,7 @@ defmodule Atex.Config.OAuth do """ @spec client_id() :: String.t() def client_id() do - if is_localhost() do + if localhost?() do query = %{redirect_uri: redirect_uri(), scope: scopes()} |> URI.encode_query() diff --git a/lib/atex/oauth/flow.ex b/lib/atex/oauth/flow.ex index b83376b..1218bff 100644 --- a/lib/atex/oauth/flow.ex +++ b/lib/atex/oauth/flow.ex @@ -230,7 +230,7 @@ defmodule Atex.OAuth.Flow do } body = - if Config.is_localhost(), + if Config.localhost?(), do: body, else: Map.merge(body, %{ -- 2.51.2