mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2024-12-23 00:26:30 +00:00
Change endpoint path
This commit is contained in:
parent
435bf1f945
commit
d26a449396
3 changed files with 6 additions and 7 deletions
|
@ -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 @@ defmodule Pleroma.Web.AdminAPI.FrontendControllerTest 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 @@ defmodule Pleroma.Web.AdminAPI.FrontendControllerTest 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 @@ defmodule Pleroma.Web.AdminAPI.FrontendControllerTest 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 @@ defmodule Pleroma.Web.AdminAPI.FrontendControllerTest 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 a new issue