Skip to content

Commit

Permalink
fix: only reset published pages (#646)
Browse files Browse the repository at this point in the history
  • Loading branch information
leandrocp authored Nov 12, 2024
1 parent 3612523 commit ef9c598
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/beacon/content.ex
Original file line number Diff line number Diff line change
Expand Up @@ -4375,8 +4375,12 @@ defmodule Beacon.Content do
@doc false
def reset_published_page(site, id) do
clear_cache(site, id)
page = get_published_page(site, id)
:ok = Beacon.RouterServer.add_page(page.site, page.id, page.path)

case get_published_page(site, id) do
nil -> :skip
page -> :ok = Beacon.RouterServer.add_page(page.site, page.id, page.path)
end

:ok
end

Expand Down

0 comments on commit ef9c598

Please sign in to comment.