Skip to content

Commit

Permalink
site endpoint should use beacon error html
Browse files Browse the repository at this point in the history
  • Loading branch information
leandrocp committed Feb 4, 2025
1 parent 9de3a74 commit b7f8c97
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions lib/mix/tasks/beacon.gen.site.ex
Original file line number Diff line number Diff line change
Expand Up @@ -346,8 +346,7 @@ defmodule Mix.Tasks.Beacon.Gen.Site do

defp configure_new_endpoint(igniter, site, host, otp_app, port, secure_port) do
new_endpoint = new_endpoint_module!(igniter, site)
error_html = Igniter.Libs.Phoenix.web_module_name(igniter, "ErrorHTML")
error_json = Igniter.Libs.Phoenix.web_module_name(igniter, "ErrorJSON")
error_html = "Beacon.Web.ErrorHTML"
pubsub = Igniter.Project.Module.module_name(igniter, "PubSub")

# TODO: replace the first two steps with `configure/6` once the `:after` option is allowed
Expand All @@ -368,7 +367,7 @@ defmodule Mix.Tasks.Beacon.Gen.Site do
url: [host: "localhost"],
adapter: Bandit.PhoenixAdapter,
render_errors: [
formats: [html: #{inspect(error_html)}, json: #{inspect(error_json)}],
formats: [html: #{error_html}],
layout: false
],
pubsub_server: #{inspect(pubsub)},
Expand Down
2 changes: 1 addition & 1 deletion test/mix/tasks/gen_site_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ defmodule Mix.Tasks.Beacon.GenSiteTest do
14 + | url: [host: "localhost"],
15 + | adapter: Bandit.PhoenixAdapter,
16 + | render_errors: [
17 + | formats: [html: TestWeb.ErrorHTML, json: TestWeb.ErrorJSON],
17 + | formats: [html: Beacon.Web.ErrorHTML],
18 + | layout: false
19 + | ],
20 + | pubsub_server: Test.PubSub,
Expand Down

0 comments on commit b7f8c97

Please sign in to comment.