diff options
author | Alexander Strizhakov <alex.strizhakov@gmail.com> | 2019-04-12 02:28:46 +0000 |
---|---|---|
committer | kaniini <nenolod@gmail.com> | 2019-04-12 02:28:46 +0000 |
commit | 711ade961e43daaf7dc89aa6fd6da1faffc152ff (patch) | |
tree | 0466472c90a80bb14dc07a5e6a1a14d6827a4a00 /lib/pleroma/web/mastodon_api/mastodon_api_controller.ex | |
parent | 9825a943917321204d26ca1b486491138c8c82da (diff) | |
download | pleroma-711ade961e43daaf7dc89aa6fd6da1faffc152ff.tar.gz |
adding destroy multiple for mastofe
Diffstat (limited to 'lib/pleroma/web/mastodon_api/mastodon_api_controller.ex')
-rw-r--r-- | lib/pleroma/web/mastodon_api/mastodon_api_controller.ex | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex b/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex index ed082abdf..f3865b2f2 100644 --- a/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex +++ b/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex @@ -612,6 +612,11 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController do end end + def destroy_multiple(%{assigns: %{user: user}} = conn, %{"ids" => ids} = _params) do + Notification.destroy_multiple(user, ids) + json(conn, %{}) + end + def relationships(%{assigns: %{user: user}} = conn, %{"id" => id}) do id = List.wrap(id) q = from(u in User, where: u.id in ^id) |