Allow direct access to draft and scheduled posts by slug
This commit is contained in:
@@ -78,12 +78,12 @@ defmodule Blogex.Test.FakeBlog do
|
||||
end
|
||||
|
||||
def get_post!(id) do
|
||||
Enum.find(all_posts(), &(&1.id == id)) ||
|
||||
Enum.find(unfiltered_posts(), &(&1.id == id)) ||
|
||||
raise Blogex.NotFoundError, "post #{inspect(id)} not found"
|
||||
end
|
||||
|
||||
def get_post(id) do
|
||||
Enum.find(all_posts(), &(&1.id == id))
|
||||
Enum.find(unfiltered_posts(), &(&1.id == id))
|
||||
end
|
||||
|
||||
def paginate(page \\ 1, per_page \\ 10) do
|
||||
|
||||
Reference in New Issue
Block a user