diff options
author | Roman Chvanikov <chvanikoff@pm.me> | 2019-09-17 16:48:24 +0300 |
---|---|---|
committer | Roman Chvanikov <chvanikoff@pm.me> | 2019-09-17 16:48:24 +0300 |
commit | 7d1773bc6b01caad8666ef07a9b2f2ac326fd0cd (patch) | |
tree | f65273d9ee0d65cc98446c394bf8f20324b7c984 /lib | |
parent | a76168e743c3dd193db6ebca029f287da9edd290 (diff) | |
download | pleroma-7d1773bc6b01caad8666ef07a9b2f2ac326fd0cd.tar.gz |
Rename SubscriptionNotificationController list and get actions to index and show
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pleroma/web/pleroma_api/subscription_notification_controller.ex | 4 | ||||
-rw-r--r-- | lib/pleroma/web/router.ex | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/pleroma/web/pleroma_api/subscription_notification_controller.ex b/lib/pleroma/web/pleroma_api/subscription_notification_controller.ex index 969ce0179..fa8307668 100644 --- a/lib/pleroma/web/pleroma_api/subscription_notification_controller.ex +++ b/lib/pleroma/web/pleroma_api/subscription_notification_controller.ex @@ -10,7 +10,7 @@ defmodule Pleroma.Web.PleromaAPI.SubscriptionNotificationController do alias Pleroma.SubscriptionNotification alias Pleroma.Web.PleromaAPI.PleromaAPI - def list(%{assigns: %{user: user}} = conn, params) do + def index(%{assigns: %{user: user}} = conn, params) do notifications = PleromaAPI.get_subscription_notifications(user, params) conn @@ -18,7 +18,7 @@ defmodule Pleroma.Web.PleromaAPI.SubscriptionNotificationController do |> render("index.json", %{notifications: notifications, for: user}) end - def get(%{assigns: %{user: user}} = conn, %{"id" => id} = _params) do + def show(%{assigns: %{user: user}} = conn, %{"id" => id} = _params) do with {:ok, notification} <- SubscriptionNotification.get(user, id) do render(conn, "show.json", %{subscription_notification: notification, for: user}) else diff --git a/lib/pleroma/web/router.ex b/lib/pleroma/web/router.ex index 1fff94b38..502c67e74 100644 --- a/lib/pleroma/web/router.ex +++ b/lib/pleroma/web/router.ex @@ -273,8 +273,8 @@ defmodule Pleroma.Web.Router do post("/clear", SubscriptionNotificationController, :clear) post("/dismiss", SubscriptionNotificationController, :dismiss) delete("/destroy_multiple", SubscriptionNotificationController, :destroy_multiple) - get("/", SubscriptionNotificationController, :list) - get("/:id", SubscriptionNotificationController, :get) + get("/", SubscriptionNotificationController, :index) + get("/:id", SubscriptionNotificationController, :show) end end |