    |> send_resp(Phoenix.Status.code(status), data)
   end
 
-  def redirect(conn, url), do: redirect(conn, 302, url)
+  def redirect(conn, url), do: redirect(conn, :found, url)
   def redirect(conn, status, url) do
     conn
     |> put_resp_header("Location", url)

  end

  def not_found(conn, method, path) do
    text conn, 404, "No route matches #{method} to #{inspect path}"
  end

  def error(conn, error) do

    end
  end

  def json(conn, json), do: json(conn, :ok, json)
  def json(conn, status, json) do
    send_response(conn, status, "application/json", json)
  end

  def html(conn, html), do: html(conn, :ok, html)
  def html(conn, status, html) do
    send_response(conn, status, "text/html", html)
  end

  def text(conn, text), do: text(conn, :ok, text)
  def text(conn, status, text) do
    send_response(conn, status, "text/plain", text)
  end
