Create api/v1/bounces endpoint

This commit is contained in:
Karl Erik Õunapuu 2020-09-17 11:55:52 +03:00
parent 188cca0c06
commit 22f9c2058d
No known key found for this signature in database
GPG key ID: C9DD647298A34764
2 changed files with 13 additions and 0 deletions

View file

@ -0,0 +1,12 @@
module Api
module V1
class BouncesController < BaseController
before_action :authenticate
def create
bounced_mail_address = BouncedMailAddress.record(json)
bounced_mail_address ? render(head: :ok) : render(head: :failed)
end
end
end
end

View file

@ -64,6 +64,7 @@ Rails.application.routes.draw do
end
resources :auctions, only: %i[index show update], param: :uuid
resources :bounces, only: %i[create]
end
match '*all', controller: 'cors', action: 'cors_preflight_check', via: [:options],