mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-27 08:16:16 +00:00
cleanup
This commit is contained in:
parent
3d492795b7
commit
79668c08fc
|
@ -2,13 +2,22 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController do
|
||||||
use Pleroma.Web, :controller
|
use Pleroma.Web, :controller
|
||||||
alias Pleroma.{Repo, Object, Activity, User, Notification, Stats}
|
alias Pleroma.{Repo, Object, Activity, User, Notification, Stats}
|
||||||
alias Pleroma.Web
|
alias Pleroma.Web
|
||||||
alias Pleroma.Web.MastodonAPI.{StatusView, AccountView, MastodonView, ListView, FilterView}
|
|
||||||
|
alias Pleroma.Web.MastodonAPI.{
|
||||||
|
StatusView,
|
||||||
|
AccountView,
|
||||||
|
MastodonView,
|
||||||
|
ListView,
|
||||||
|
FilterView,
|
||||||
|
PushSubscriptionView
|
||||||
|
}
|
||||||
|
|
||||||
alias Pleroma.Web.ActivityPub.ActivityPub
|
alias Pleroma.Web.ActivityPub.ActivityPub
|
||||||
alias Pleroma.Web.ActivityPub.Utils
|
alias Pleroma.Web.ActivityPub.Utils
|
||||||
alias Pleroma.Web.CommonAPI
|
alias Pleroma.Web.CommonAPI
|
||||||
alias Pleroma.Web.OAuth.{Authorization, Token, App}
|
alias Pleroma.Web.OAuth.{Authorization, Token, App}
|
||||||
alias Pleroma.Web.MediaProxy
|
alias Pleroma.Web.MediaProxy
|
||||||
alias Comeonin.Pbkdf2
|
|
||||||
import Ecto.Query
|
import Ecto.Query
|
||||||
require Logger
|
require Logger
|
||||||
|
|
||||||
|
@ -1160,8 +1169,6 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController do
|
||||||
json(conn, %{})
|
json(conn, %{})
|
||||||
end
|
end
|
||||||
|
|
||||||
alias Pleroma.Web.MastodonAPI.PushSubscriptionView
|
|
||||||
|
|
||||||
def create_push_subscription(%{assigns: %{user: user, token: token}} = conn, params) do
|
def create_push_subscription(%{assigns: %{user: user, token: token}} = conn, params) do
|
||||||
Pleroma.Web.Push.Subscription.delete_if_exists(user, token)
|
Pleroma.Web.Push.Subscription.delete_if_exists(user, token)
|
||||||
{:ok, subscription} = Pleroma.Web.Push.Subscription.create(user, token, params)
|
{:ok, subscription} = Pleroma.Web.Push.Subscription.create(user, token, params)
|
||||||
|
|
|
@ -70,7 +70,6 @@ defmodule Pleroma.Web.Push do
|
||||||
|
|
||||||
data ->
|
data ->
|
||||||
Logger.error("Web Push Nonification failed with unknown error")
|
Logger.error("Web Push Nonification failed with unknown error")
|
||||||
IO.inspect(data)
|
|
||||||
:error
|
:error
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
Loading…
Reference in a new issue