push_subscription_view.ex 361 Bytes
Newer Older
1
2
3
4
5
6
7
8
defmodule Pleroma.Web.MastodonAPI.PushSubscriptionView do
  use Pleroma.Web, :view
  alias Pleroma.Web.MastodonAPI.PushSubscriptionView

  def render("push_subscription.json", %{subscription: subscription}) do
    %{
      id: to_string(subscription.id),
      endpoint: subscription.endpoint,
minibikini's avatar
minibikini committed
9
      alerts: Map.get(subscription.data, "alerts")
10
11
12
    }
  end
end