forked from AkkomaGang/akkoma
/api/ap/uploadMedia → /api/ap/upload_media
This commit is contained in:
parent
5820dc40fc
commit
0dc8f3d6d2
3 changed files with 4 additions and 4 deletions
|
@ -572,7 +572,7 @@ defmodule Pleroma.Web.Router do
|
||||||
scope [] do
|
scope [] do
|
||||||
pipe_through(:oauth_write)
|
pipe_through(:oauth_write)
|
||||||
post("/users/:nickname/outbox", ActivityPubController, :update_outbox)
|
post("/users/:nickname/outbox", ActivityPubController, :update_outbox)
|
||||||
post("/api/ap/uploadMedia", ActivityPubController, :upload_media)
|
post("/api/ap/upload_media", ActivityPubController, :upload_media)
|
||||||
end
|
end
|
||||||
|
|
||||||
scope [] do
|
scope [] do
|
||||||
|
|
|
@ -1008,7 +1008,7 @@ test "uploadMedia", %{conn: conn} do
|
||||||
conn =
|
conn =
|
||||||
conn
|
conn
|
||||||
|> assign(:user, user)
|
|> assign(:user, user)
|
||||||
|> post("/api/ap/uploadMedia", %{"file" => image, "description" => desc})
|
|> post("/api/ap/upload_media", %{"file" => image, "description" => desc})
|
||||||
|
|
||||||
assert object = json_response(conn, :created)
|
assert object = json_response(conn, :created)
|
||||||
assert object["name"] == desc
|
assert object["name"] == desc
|
||||||
|
|
|
@ -401,7 +401,7 @@ test "activity+json format. it redirects on actual feed of user", %{conn: conn}
|
||||||
"oauthRegistrationEndpoint" => "#{Pleroma.Web.base_url()}/api/v1/apps",
|
"oauthRegistrationEndpoint" => "#{Pleroma.Web.base_url()}/api/v1/apps",
|
||||||
"oauthTokenEndpoint" => "#{Pleroma.Web.base_url()}/oauth/token",
|
"oauthTokenEndpoint" => "#{Pleroma.Web.base_url()}/oauth/token",
|
||||||
"sharedInbox" => "#{Pleroma.Web.base_url()}/inbox",
|
"sharedInbox" => "#{Pleroma.Web.base_url()}/inbox",
|
||||||
"uploadMedia" => "#{Pleroma.Web.base_url()}/api/ap/uploadMedia"
|
"uploadMedia" => "#{Pleroma.Web.base_url()}/api/ap/upload_media"
|
||||||
}
|
}
|
||||||
|
|
||||||
assert response["@context"] == [
|
assert response["@context"] == [
|
||||||
|
@ -464,7 +464,7 @@ test "json format. it redirects on actual feed of user", %{conn: conn} do
|
||||||
"oauthRegistrationEndpoint" => "#{Pleroma.Web.base_url()}/api/v1/apps",
|
"oauthRegistrationEndpoint" => "#{Pleroma.Web.base_url()}/api/v1/apps",
|
||||||
"oauthTokenEndpoint" => "#{Pleroma.Web.base_url()}/oauth/token",
|
"oauthTokenEndpoint" => "#{Pleroma.Web.base_url()}/oauth/token",
|
||||||
"sharedInbox" => "#{Pleroma.Web.base_url()}/inbox",
|
"sharedInbox" => "#{Pleroma.Web.base_url()}/inbox",
|
||||||
"uploadMedia" => "#{Pleroma.Web.base_url()}/api/ap/uploadMedia"
|
"uploadMedia" => "#{Pleroma.Web.base_url()}/api/ap/upload_media"
|
||||||
}
|
}
|
||||||
|
|
||||||
assert response["@context"] == [
|
assert response["@context"] == [
|
||||||
|
|
Loading…
Reference in a new issue