Class: Auth::Endpoint
- Inherits:
-
Object
- Object
- Auth::Endpoint
- Includes:
- Mongoid::Document
- Defined in:
- app/models/auth/endpoint.rb
Instance Method Summary collapse
Instance Method Details
#set_android_endpoint ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'app/models/auth/endpoint.rb', line 10 def set_android_endpoint return unless self.android_token return if self.android_endpoint if response = $sns_client.create_platform_endpoint(platform_application_arn: ENV["ANDROID_ARN"], token: self.android_token, attributes: {}) self.android_endpoint = response.endpoint_arn self.android_endpoint else nil end end |
#set_ios_endpoint ⇒ Object
26 27 28 |
# File 'app/models/auth/endpoint.rb', line 26 def set_ios_endpoint return unless self.ios_token end |