Allow different SMS settings for different tenants
This commit is contained in:
@@ -57,7 +57,7 @@ staging:
|
|||||||
# my_tenant_subdomain:
|
# my_tenant_subdomain:
|
||||||
# secret_key: my_secret_value
|
# secret_key: my_secret_value
|
||||||
#
|
#
|
||||||
# Currently you can overwrite SMTP settings.
|
# Currently you can overwrite SMTP settings and SMS settings.
|
||||||
<<: *maps
|
<<: *maps
|
||||||
<<: *apis
|
<<: *apis
|
||||||
|
|
||||||
@@ -92,7 +92,7 @@ preproduction:
|
|||||||
# my_tenant_subdomain:
|
# my_tenant_subdomain:
|
||||||
# secret_key: my_secret_value
|
# secret_key: my_secret_value
|
||||||
#
|
#
|
||||||
# Currently you can overwrite SMTP settings.
|
# Currently you can overwrite SMTP settings and SMS settings.
|
||||||
twitter_key: ""
|
twitter_key: ""
|
||||||
twitter_secret: ""
|
twitter_secret: ""
|
||||||
facebook_key: ""
|
facebook_key: ""
|
||||||
@@ -132,7 +132,7 @@ production:
|
|||||||
# my_tenant_subdomain:
|
# my_tenant_subdomain:
|
||||||
# secret_key: my_secret_value
|
# secret_key: my_secret_value
|
||||||
#
|
#
|
||||||
# Currently you can overwrite SMTP settings.
|
# Currently you can overwrite SMTP settings and SMS settings.
|
||||||
twitter_key: ""
|
twitter_key: ""
|
||||||
twitter_secret: ""
|
twitter_secret: ""
|
||||||
facebook_key: ""
|
facebook_key: ""
|
||||||
|
|||||||
@@ -9,11 +9,11 @@ class SMSApi
|
|||||||
def url
|
def url
|
||||||
return "" unless end_point_available?
|
return "" unless end_point_available?
|
||||||
|
|
||||||
URI.parse(Rails.application.secrets.sms_end_point).to_s
|
URI.parse(Tenant.current_secrets.sms_end_point).to_s
|
||||||
end
|
end
|
||||||
|
|
||||||
def authorization
|
def authorization
|
||||||
Base64.encode64("#{Rails.application.secrets.sms_username}:#{Rails.application.secrets.sms_password}")
|
Base64.encode64("#{Tenant.current_secrets.sms_username}:#{Tenant.current_secrets.sms_password}")
|
||||||
end
|
end
|
||||||
|
|
||||||
def sms_deliver(phone, code)
|
def sms_deliver(phone, code)
|
||||||
|
|||||||
Reference in New Issue
Block a user