Class: MobileWorkflow::SnsNotificationsController

Inherits:
ActionController::API
  • Object
show all
Defined in:
app/controllers/mobile_workflow/sns_notifications_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject



6
7
8
9
10
11
12
13
14
15
# File 'app/controllers/mobile_workflow/sns_notifications_controller.rb', line 6

def create
  Rails.logger.info("Message body: #{message_body}")
    
  case message_body['Type']
  when 'SubscriptionConfirmation'
    confirm_subscription ? (head :ok) : (head :bad_request)
  else
    add_attachment
  end
end