Sha256: f9a41ec1c1bafa43858e342e4dcb0d65003a8570531d99f56fc2a57da233d030
Contents?: true
Size: 610 Bytes
Versions: 30
Compression:
Stored size: 610 Bytes
Contents
class Auth::Endpoint include Mongoid::Document field :android_endpoint, type: String field :ios_endpoint, type: String field :android_token, type: String field :ios_token, type: String 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 def set_ios_endpoint return unless self.ios_token end end
Version data entries
30 entries across 30 versions & 1 rubygems