5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-22 22:16:22 +00:00

feat: creado modulo BaseService para opcion de auto_publicacion #13244
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
jazzari 2023-10-02 15:40:44 -03:00
parent 823b191872
commit 331dc7f607
3 changed files with 9 additions and 0 deletions

View file

@ -0,0 +1,5 @@
module BaseService
def auto_publish!
DeployJob.perform_later site if site.auto_publish?
end
end

View file

@ -3,6 +3,8 @@
# 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 BaseService
# Crea un artículo nuevo
#
# @return Post

View file

@ -3,6 +3,8 @@
# Se encargar de guardar cambios en sitios
# TODO: Implementar rollback en la configuración
SiteService = Struct.new(:site, :usuarie, :params, keyword_init: true) do
include BaseService
def deploy
site.enqueue!
DeployJob.perform_later site.id