Class: LinkIO::PendingLinksController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- LinkIO::PendingLinksController
- Defined in:
- app/controllers/linkio/pending_links_controller.rb
Overview
Retrieves pending links for deferred deep linking.
Instance Method Summary collapse
-
#by_device ⇒ Object
GET /pending-link/:device_id.
-
#by_fingerprint ⇒ Object
GET /pending-link (matched by client IP fingerprint).
Instance Method Details
#by_device ⇒ Object
GET /pending-link/:device_id
7 8 9 10 |
# File 'app/controllers/linkio/pending_links_controller.rb', line 7 def by_device deep_link = linkio_client.pending_link(params[:device_id]) respond_with_deep_link(deep_link) end |
#by_fingerprint ⇒ Object
GET /pending-link (matched by client IP fingerprint)
13 14 15 16 17 18 19 20 21 |
# File 'app/controllers/linkio/pending_links_controller.rb', line 13 def by_fingerprint ip = LinkIO::Utils.client_ip( forwarded_for: request.headers["X-Forwarded-For"], ip: request.remote_ip, remote_address: request.remote_addr ) deep_link = linkio_client.pending_link_by_fingerprint(ip, request.user_agent) respond_with_deep_link(deep_link) end |