mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-23 03:06:21 +00:00
fix: corregida llamada a auto_publish! #13244
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
This commit is contained in:
parent
919b015daf
commit
0ab0b143f3
2 changed files with 8 additions and 5 deletions
|
@ -4,7 +4,9 @@
|
|||
module AutoPublishConcern
|
||||
extend ActiveSupport::Concern
|
||||
|
||||
def auto_publish!
|
||||
DeployJob.perform_later(site.id) if site.auto_publish?
|
||||
included do
|
||||
def auto_publish!
|
||||
DeployJob.perform_later(site.id) if site.auto_publish?
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
# Este servicio se encarga de crear artículos y guardarlos en git,
|
||||
# asignándoselos a une usuarie
|
||||
PostService = Struct.new(:site, :usuarie, :post, :params, keyword_init: true) do
|
||||
include AutoPublishConcern
|
||||
|
||||
# Crea un artículo nuevo
|
||||
#
|
||||
|
@ -24,7 +25,7 @@ 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
|
||||
include AutoPublishConcern
|
||||
auto_publish!
|
||||
end
|
||||
|
||||
# Crear un post anónimo, con opciones más limitadas. No usamos post.
|
||||
|
@ -38,7 +39,7 @@ PostService = Struct.new(:site, :usuarie, :post, :params, keyword_init: true) do
|
|||
|
||||
commit(action: :created, add: [post.path.absolute]) if post.update(anon_post_params)
|
||||
post
|
||||
include AutoPublishConcern
|
||||
auto_publish!
|
||||
end
|
||||
|
||||
def update
|
||||
|
@ -60,7 +61,7 @@ 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
|
||||
include AutoPublishConcern
|
||||
auto_publish!
|
||||
end
|
||||
|
||||
def destroy
|
||||
|
|
Loading…
Reference in a new issue