diff --git a/app/services/post_service.rb b/app/services/post_service.rb index ce6b1b26..9aa3becf 100644 --- a/app/services/post_service.rb +++ b/app/services/post_service.rb @@ -30,8 +30,8 @@ PostService = Struct.new(:site, :usuarie, :post, :params, keyword_init: true) do # Devolver el post aunque no se haya salvado para poder rescatar los # errores - post auto_publish! + post end # Crear un post anónimo, con opciones más limitadas. No usamos post. @@ -44,8 +44,8 @@ PostService = Struct.new(:site, :usuarie, :post, :params, keyword_init: true) do params[:draft] = true commit(action: :created, add: files) if post.update(anon_post_params) - post auto_publish! + post end def update @@ -69,8 +69,8 @@ PostService = Struct.new(:site, :usuarie, :post, :params, keyword_init: true) do # Devolver el post aunque no se haya salvado para poder rescatar los # errores - post auto_publish! + post end def destroy diff --git a/app/services/site_service.rb b/app/services/site_service.rb index c86ff12c..40f24770 100644 --- a/app/services/site_service.rb +++ b/app/services/site_service.rb @@ -44,6 +44,7 @@ SiteService = Struct.new(:site, :usuarie, :params, keyword_init: true) do deploy end + auto_publish! site end