diff options
author | Haelwenn (lanodan) Monnier <contact@hacktivis.me> | 2018-08-21 20:35:14 +0200 |
---|---|---|
committer | Haelwenn (lanodan) Monnier <contact@hacktivis.me> | 2018-08-27 15:09:06 +0200 |
commit | 6973b77e9462475361772907ddd690a960041b64 (patch) | |
tree | 895b277d8be6bad73fd235f37b133032c8d0a828 /lib | |
parent | 9bddb39ff097d527ef71860a1d0498dc57f7cd06 (diff) | |
download | pleroma-6973b77e9462475361772907ddd690a960041b64.tar.gz |
[Pleroma.Web.MastodonAPI.FilterView] fix expires_at being a unsafe variable
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pleroma/web/mastodon_api/views/filter_view.ex | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/pleroma/web/mastodon_api/views/filter_view.ex b/lib/pleroma/web/mastodon_api/views/filter_view.ex index e8401cc2d..6bd687d46 100644 --- a/lib/pleroma/web/mastodon_api/views/filter_view.ex +++ b/lib/pleroma/web/mastodon_api/views/filter_view.ex @@ -8,11 +8,12 @@ defmodule Pleroma.Web.MastodonAPI.FilterView do end def render("filter.json", %{filter: filter}) do - if filter.expires_at do - expires_at = Utils.to_masto_date(filter.expires_at) - else - expires_at = nil - end + expires_at = + if filter.expires_at do + Utils.to_masto_date(filter.expires_at) + else + nil + end %{ id: to_string(filter.filter_id), |