# frozen_string_literal: true module Api module V1 # Recibe webhooks y lanza jobs class WebhooksController < BaseController def pull # encontrar el sitio site = Site.find_by_name(params[:site_id]) usuarie = GitAuthor.new email: "webhook@#{Site.domain}", name: 'Webhook' message = I18n.t('webhooks.pull.message') GitPullJob.perform_later(site, usuarie, message) end end end end