mirror of
https://github.com/internetee/registry.git
synced 2025-06-07 21:25:39 +02:00
Create api/v1/bounces endpoint
This commit is contained in:
parent
188cca0c06
commit
22f9c2058d
2 changed files with 13 additions and 0 deletions
12
app/controllers/api/v1/bounces_controller.rb
Normal file
12
app/controllers/api/v1/bounces_controller.rb
Normal 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
|
|
@ -64,6 +64,7 @@ Rails.application.routes.draw do
|
||||||
end
|
end
|
||||||
|
|
||||||
resources :auctions, only: %i[index show update], param: :uuid
|
resources :auctions, only: %i[index show update], param: :uuid
|
||||||
|
resources :bounces, only: %i[create]
|
||||||
end
|
end
|
||||||
|
|
||||||
match '*all', controller: 'cors', action: 'cors_preflight_check', via: [:options],
|
match '*all', controller: 'cors', action: 'cors_preflight_check', via: [:options],
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue