Implement shared key authentication to bounces API

This commit is contained in:
Karl Erik Õunapuu 2020-09-17 16:26:50 +03:00
parent b2c5a9a5ec
commit 03182f9222
No known key found for this signature in database
GPG key ID: C9DD647298A34764
3 changed files with 11 additions and 1 deletions

View file

@ -1,10 +1,12 @@
module Api
module V1
class BouncesController < BaseController
before_action :authenticate_shared_key
# POST api/v1/bounces/
def create
BouncedMailAddress.record(bounce_params)
head(:ok)
head(:created)
rescue ActionController::ParameterMissing
head(:bad_request)
end