Fix feed favicon_url not setting
This commit is contained in:
parent
5da980aef4
commit
5087ef0395
|
@ -25,8 +25,12 @@ defmodule Frenzy.Task.FetchFavicon do
|
||||||
|
|
||||||
with %Feed{favicon_url: old_url} when old_url != favicon_url <- feed,
|
with %Feed{favicon_url: old_url} when old_url != favicon_url <- feed,
|
||||||
{:ok, favicon_data} <- fetch_favicon_data(favicon_url) do
|
{:ok, favicon_data} <- fetch_favicon_data(favicon_url) do
|
||||||
IO.inspect(favicon_url)
|
changeset =
|
||||||
changeset = Feed.changeset(feed, %{favicon: favicon_data, favicon_url: favicon_url})
|
Feed.changeset(feed, %{
|
||||||
|
favicon: favicon_data,
|
||||||
|
favicon_url: to_string(favicon_url)
|
||||||
|
})
|
||||||
|
|
||||||
{:ok, _feed} = Repo.update(changeset)
|
{:ok, _feed} = Repo.update(changeset)
|
||||||
else
|
else
|
||||||
_ ->
|
_ ->
|
||||||
|
|
Loading…
Reference in New Issue