router: change scrobble timeline route from now-playing to scrobbles
This commit is contained in:
parent
8b34b221cb
commit
a6e1469767
3 changed files with 6 additions and 4 deletions
|
|
@ -110,7 +110,7 @@ defmodule Pleroma.Web.PleromaAPI.PleromaAPIController do
|
|||
end
|
||||
end
|
||||
|
||||
def user_now_playing(%{assigns: %{user: reading_user}} = conn, params) do
|
||||
def user_scrobbles(%{assigns: %{user: reading_user}} = conn, params) do
|
||||
with %User{} = user <- User.get_cached_by_nickname_or_id(params["id"], for: reading_user) do
|
||||
params = Map.put(params, "type", ["Listen"])
|
||||
|
||||
|
|
|
|||
|
|
@ -310,7 +310,7 @@ defmodule Pleroma.Web.Router do
|
|||
scope "/api/v1/pleroma", Pleroma.Web.PleromaAPI do
|
||||
pipe_through([:api, :oauth_read_or_public])
|
||||
|
||||
get("/accounts/:id/now-playing", PleromaAPIController, :user_now_playing)
|
||||
get("/accounts/:id/scrobbles", PleromaAPIController, :user_scrobbles)
|
||||
end
|
||||
|
||||
scope "/api/v1", Pleroma.Web.MastodonAPI do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue