Make the emoji controller api more RESTy
This commit is contained in:
parent
3971bf9c5f
commit
6cd651a38b
|
@ -220,17 +220,17 @@ defmodule Pleroma.Web.Router do
|
||||||
|
|
||||||
post("/import_from_fs", EmojiAPIController, :import_from_fs)
|
post("/import_from_fs", EmojiAPIController, :import_from_fs)
|
||||||
|
|
||||||
post("/update_file/:pack_name", EmojiAPIController, :update_file)
|
post("/:pack_name/update_file", EmojiAPIController, :update_file)
|
||||||
post("/update_metadata/:pack_name", EmojiAPIController, :update_metadata)
|
post("/:pack_name/update_metadata", EmojiAPIController, :update_metadata)
|
||||||
post("/create/:name", EmojiAPIController, :create)
|
put("/:name", EmojiAPIController, :create)
|
||||||
delete("/delete/:name", EmojiAPIController, :delete)
|
delete("/:name", EmojiAPIController, :delete)
|
||||||
post("/download_from", EmojiAPIController, :download_from)
|
post("/download_from", EmojiAPIController, :download_from)
|
||||||
end
|
end
|
||||||
|
|
||||||
scope "/packs" do
|
scope "/packs" do
|
||||||
# Pack info / downloading
|
# Pack info / downloading
|
||||||
get("/", EmojiAPIController, :list_packs)
|
get("/", EmojiAPIController, :list_packs)
|
||||||
get("/download_shared/:name", EmojiAPIController, :download_shared)
|
get("/:name/download_shared/", EmojiAPIController, :download_shared)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -343,7 +343,7 @@ test "creating and deleting a pack" do
|
||||||
|
|
||||||
assert conn
|
assert conn
|
||||||
|> put_req_header("content-type", "application/json")
|
|> put_req_header("content-type", "application/json")
|
||||||
|> post(
|
|> put(
|
||||||
emoji_api_path(
|
emoji_api_path(
|
||||||
conn,
|
conn,
|
||||||
:create,
|
:create,
|
||||||
|
|
Loading…
Reference in New Issue