Packages

Kanta plugin for syncing translations on staging/dev with production

Current section

Files

Jump to
kanta_sync_plugin lib adapter connection_checker.ex
Raw

lib/adapter/connection_checker.ex

defmodule Kanta.Sync.Adapter.ConnectionChecker do
@moduledoc false
import Kanta.Sync.Adapter
def call do
with {:ok, %Tesla.Env{status: 200, body: body}} <-
get("/"),
%{"status" => "OK"} <-
body do
true
else
_x ->
false
end
end
end