Change endpoint path
This commit is contained in:
parent
435bf1f945
commit
d26a449396
|
@ -1525,8 +1525,7 @@ Returns the content of the document
|
|||
]
|
||||
```
|
||||
|
||||
|
||||
## `POST /api/pleroma/admin/frontends
|
||||
## `POST /api/pleroma/admin/frontends/install
|
||||
|
||||
### Install a frontend
|
||||
|
||||
|
|
|
@ -245,7 +245,7 @@ defmodule Pleroma.Web.Router do
|
|||
delete("/chats/:id/messages/:message_id", ChatController, :delete_message)
|
||||
|
||||
get("/frontends", FrontendController, :index)
|
||||
post("/frontends", FrontendController, :install)
|
||||
post("/frontends/install", FrontendController, :install)
|
||||
|
||||
post("/backups", AdminAPIController, :create_backup)
|
||||
end
|
||||
|
|
|
@ -44,7 +44,7 @@ test "it lists available frontends", %{conn: conn} do
|
|||
end
|
||||
end
|
||||
|
||||
describe "POST /api/pleroma/admin/frontends" do
|
||||
describe "POST /api/pleroma/admin/frontends/install" do
|
||||
test "from available frontends", %{conn: conn} do
|
||||
clear_config([:frontends, :available], %{
|
||||
"pleroma" => %{
|
||||
|
@ -60,7 +60,7 @@ test "from available frontends", %{conn: conn} do
|
|||
|
||||
conn
|
||||
|> put_req_header("content-type", "application/json")
|
||||
|> post("/api/pleroma/admin/frontends", %{name: "pleroma"})
|
||||
|> post("/api/pleroma/admin/frontends/install", %{name: "pleroma"})
|
||||
|> json_response_and_validate_schema(:ok)
|
||||
|
||||
assert File.exists?(Path.join([@dir, "frontends", "pleroma", "fantasy", "test.txt"]))
|
||||
|
@ -92,7 +92,7 @@ test "from a file", %{conn: conn} do
|
|||
|
||||
conn
|
||||
|> put_req_header("content-type", "application/json")
|
||||
|> post("/api/pleroma/admin/frontends", %{
|
||||
|> post("/api/pleroma/admin/frontends/install", %{
|
||||
name: "pleroma",
|
||||
file: "test/fixtures/tesla_mock/frontend.zip"
|
||||
})
|
||||
|
@ -108,7 +108,7 @@ test "from an URL", %{conn: conn} do
|
|||
|
||||
conn
|
||||
|> put_req_header("content-type", "application/json")
|
||||
|> post("/api/pleroma/admin/frontends", %{
|
||||
|> post("/api/pleroma/admin/frontends/install", %{
|
||||
name: "unknown",
|
||||
ref: "baka",
|
||||
build_url: "http://gensokyo.2hu/madeup.zip",
|
||||
|
|
Loading…
Reference in New Issue