2018-09-18 03:56:46 -06:00
|
|
|
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,
|
2018-12-06 06:42:00 -07:00
|
|
|
alerts: Map.get(subscription.data, "alerts")
|
2018-09-18 03:56:46 -06:00
|
|
|
}
|
|
|
|
end
|
|
|
|
end
|