defmodule BrightWeb.PageController do use BrightWeb, :controller def home(conn, _params) do # The home page is often custom made, # so skip the default app layout. # render(conn, :home, layout: false) # send_resp(conn, 201, "") conn |> put_flash(:info, "You are beautiful!") |> put_flash(:error, "Test error!") |> put_status(202) |> render(:home, layout: false) # redirect(conn, to: ~p"/redirect_test") # redirect(conn, external: "https://elixir-lang.org/") end def about(conn, _params) do render(conn, :about, layout: false) end def api(conn, _params) do render(conn, :api, layout: false) end def redirect_test(conn, _params) do render(conn, :home, layout: false) end end