Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Plugins::PluginInstagramsController < Plugins::BaseController
- def handle_user_subscription
- if request.get?
- render :text => params['hub.challenge'] and return
- end
- if request.post?
- notifications = params['_json']
- for n in notifications
- logger.debug "Adding new photo: " << n.to_s
- plugin = PluginInstagram.find_by_instagram_user_id(n['object_id'].to_i)
- job = Delayed::Job.enqueue CachePhotoJob.new(plugin)
- end
- end
- render :nothing => true
- end
- end
Add Comment
Please, Sign In to add comment