Refactor conn aliasing in controller tests to use pipe chains

Applied refactor_conn_aliasing.sh to eliminate conn shadowing.

Show draft posts in test and dev
This commit is contained in:
Willem van den Ende
2026-03-20 21:36:08 +00:00
parent c18f9cd2e3
commit 9426582abc
7 changed files with 74 additions and 52 deletions
+5
View File
@@ -110,6 +110,11 @@ defmodule Blogex do
* `Blogex.Router` — mountable Plug router
"""
@doc "Returns true if draft posts should be visible (dev/test environments)."
def show_drafts? do
Application.get_env(:blogex, :show_drafts, false)
end
defdelegate blogs, to: Blogex.Registry
defdelegate get_blog!(blog_id), to: Blogex.Registry
defdelegate get_blog(blog_id), to: Blogex.Registry