send response

pull/1596/head
Ayrat Badykov 6 years ago
parent e60ebb602e
commit 9c1442dfe3
No known key found for this signature in database
GPG Key ID: B44668E265E9396F
  1. 6
      apps/block_scout_web/lib/block_scout_web/controllers/api/v1/decompiled_smart_contract_controller.ex

@ -7,13 +7,13 @@ defmodule BlockScoutWeb.API.V1.DecompiledSmartContractController do
if auth_token(conn) == actual_token() do if auth_token(conn) == actual_token() do
case Chain.create_decompiled_smart_contract(params) do case Chain.create_decompiled_smart_contract(params) do
{:ok, _decompiled_source_code} -> {:ok, _decompiled_source_code} ->
put_status(conn, :created) send_resp(conn, :created, "")
{:error, _changeset} -> {:error, _changeset} ->
put_status(conn, :unprocessable_entity) send_resp(conn, :unprocessable_entity, "")
end end
else else
put_status(conn, :forbidden) send_resp(conn, :forbidden, "")
end end
end end

Loading…
Cancel
Save