aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/web/router.ex
diff options
context:
space:
mode:
Diffstat (limited to 'lib/pleroma/web/router.ex')
-rw-r--r--lib/pleroma/web/router.ex11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/pleroma/web/router.ex b/lib/pleroma/web/router.ex
index 805bef16f..bd5f02af1 100644
--- a/lib/pleroma/web/router.ex
+++ b/lib/pleroma/web/router.ex
@@ -300,6 +300,17 @@ defmodule Pleroma.Web.Router do
patch("/conversations/:id", PleromaAPIController, :update_conversation)
post("/notifications/read", PleromaAPIController, :read_notification)
end
+
+ scope [] do
+ pipe_through(:oauth_write)
+ post("/now-playing", PleromaAPIController, :update_now_playing)
+ end
+ end
+
+ scope "/api/v1/pleroma", Pleroma.Web.PleromaAPI do
+ pipe_through([:api, :oauth_read_or_public])
+
+ get("/accounts/:id/now-playing", PleromaAPIController, :user_now_playing)
end
scope "/api/v1", Pleroma.Web.MastodonAPI do