wip(growth): change from with
to case
All checks were successful
continuous-integration/drone/pr Build is passing
All checks were successful
continuous-integration/drone/pr Build is passing
This commit is contained in:
parent
58f14c0346
commit
2fedb4ecf0
@ -228,10 +228,12 @@ defmodule Growth.Indicators.Download do
|
|||||||
end
|
end
|
||||||
|
|
||||||
def fetch!(url) do
|
def fetch!(url) do
|
||||||
with {:ok, %{status: 200, body: body}} <- Req.get(url) do
|
case Req.get(url) do
|
||||||
body
|
{:ok, %{status: 200, body: body}} ->
|
||||||
else
|
body
|
||||||
_ -> raise("fetch failed for url #{url}")
|
|
||||||
|
_ ->
|
||||||
|
raise("fetch failed for url #{url}")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user