Sha256: d0692ef65bf1ca49e84feb7b5c4dedc9862b06393cb81ebf0007fe7f63dcb44d
Contents?: true
Size: 524 Bytes
Versions: 190
Compression:
Stored size: 524 Bytes
Contents
# frozen_string_literal: true module Motor class SendAlertsController < ApiBaseController wrap_parameters :data before_action :build_alert, only: :create authorize_resource :alert, only: :create def create AlertsMailer.alert_email(@alert).deliver_now! head :ok end private def build_alert @alert = Motor::Alerts::Persistance.build_from_params(alert_params) end def alert_params params.require(:data).permit(:query_id, :name, :to_emails) end end end
Version data entries
190 entries across 190 versions & 2 rubygems