Add supported languages list to /api/v2/instance

Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
marcin mikołajczak 2022-11-08 23:09:42 +01:00
commit 28f8bb00d8
9 changed files with 155 additions and 25 deletions

View file

@ -1578,6 +1578,15 @@ defmodule HttpRequestMock do
}}
end
def post("https://api-free.deepl.com/v2/languages" <> _, _, _, _) do
{:ok,
%Tesla.Env{
status: 200,
body: File.read!("test/fixtures/tesla_mock/deepl-languages-list.json"),
headers: [{"content-type", "application/json"}]
}}
end
def post(url, query, body, headers) do
{:error,
"Mock response not implemented for POST #{inspect(url)}, #{query}, #{inspect(body)}, #{inspect(headers)}"}