diff options
author | eugenijm <eugenijm@protonmail.com> | 2019-03-28 14:52:09 +0300 |
---|---|---|
committer | eugenijm <eugenijm@protonmail.com> | 2019-03-28 18:55:16 +0300 |
commit | cd90695a349f33b84f287794bae6070e9eec446a (patch) | |
tree | 92fc170ff80b7c066f7f795b1a3e91f81279edf2 /lib/pleroma/web/twitter_api/controllers/util_controller.ex | |
parent | 55d086b52077a220aef60c8d9071aea990431d74 (diff) | |
download | pleroma-cd90695a349f33b84f287794bae6070e9eec446a.tar.gz |
Add PUT /api/pleroma/notification_settings endpoint
Diffstat (limited to 'lib/pleroma/web/twitter_api/controllers/util_controller.ex')
-rw-r--r-- | lib/pleroma/web/twitter_api/controllers/util_controller.ex | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/pleroma/web/twitter_api/controllers/util_controller.ex b/lib/pleroma/web/twitter_api/controllers/util_controller.ex index faa733fec..2708299cb 100644 --- a/lib/pleroma/web/twitter_api/controllers/util_controller.ex +++ b/lib/pleroma/web/twitter_api/controllers/util_controller.ex @@ -269,6 +269,12 @@ defmodule Pleroma.Web.TwitterAPI.UtilController do json(conn, Enum.into(Emoji.get_all(), %{})) end + def update_notificaton_settings(%{assigns: %{user: user}} = conn, params) do + with {:ok, _} <- User.update_notification_settings(user, params) do + json(conn, %{status: "success"}) + end + end + def follow_import(conn, %{"list" => %Plug.Upload{} = listfile}) do follow_import(conn, %{"list" => File.read!(listfile.path)}) end |