defmodule SimpleshopThemeWeb.ErrorPreviewController do
  @moduledoc """
  Development-only controller for previewing error pages.
  """
  use SimpleshopThemeWeb, :controller

  def not_found(conn, _params) do
    conn
    |> put_status(:not_found)
    |> put_view(SimpleshopThemeWeb.ErrorHTML)
    |> render("404.html")
  end

  def server_error(conn, _params) do
    conn
    |> put_status(:internal_server_error)
    |> put_view(SimpleshopThemeWeb.ErrorHTML)
    |> render("500.html")
  end
end
