Class: Meerstats::ApiController

Inherits:
ActionController::Base
  • Object
show all
Defined in:
app/controllers/meerstats/api_controller.rb

Direct Known Subclasses

Api::HealthCheckController

Instance Method Summary collapse

Instance Method Details

#verify_access_tokenObject



5
6
7
8
9
10
# File 'app/controllers/meerstats/api_controller.rb', line 5

def verify_access_token
  if params[:access_token] != Meerstats.configuration.access_token
    render json: { error: 'not authorized' }, status: 401
    return
  end
end