We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 98ebc3d commit d68055fCopy full SHA for d68055f
lib/opencov/plug/multipart_job.ex
@@ -28,14 +28,14 @@ defmodule Librecov.Plug.MultipartJob do
28
handle(content_type, conn)
29
end
30
31
- def handle("application/json", %{params: %{"json" => json}} = conn) when is_binary(json) do
+ def handle("multipart/form-data", %{params: %{"json_file" => file}} = conn) do
32
conn
33
- |> put_parsed_job(json)
+ |> put_parsed_job(file |> read_file())
34
35
36
- def handle("multipart/form-data", %{params: %{"json_file" => file}} = conn) do
+ def handle(_, %{params: %{"json" => json}} = conn) when is_binary(json) do
37
38
- |> put_parsed_job(file |> read_file())
+ |> put_parsed_job(json)
39
40
41
def handle(content_type, conn) do
0 commit comments