added toggle feature

This commit is contained in:
olegphenomenon 2022-02-10 14:36:35 +02:00
parent 7e0c6b3afb
commit ef03166fee
6 changed files with 61 additions and 38 deletions

View file

@ -3,6 +3,7 @@ module EisBilling
protect_from_forgery with: :null_session
skip_authorization_check # Temporary solution
# skip_before_action :verify_authenticity_token # Temporary solution
before_action :persistent
before_action :authorized
def encode_token(payload)
@ -47,5 +48,11 @@ module EisBilling
def logger
@logger ||= Rails.logger
end
def persistent
return true if Feature.billing_system_integrated?
render json: { message: "We don't work yet!" }, status: :unauthorized
end
end
end