FIX: raise a 404 if click tracker gets no url

This commit is contained in:
Sam 2015-05-06 11:27:41 +10:00
parent 0bbf6354eb
commit 376b28b0ed

View file

@ -3,6 +3,8 @@ class ClicksController < ApplicationController
skip_before_filter :check_xhr
def track
raise Discourse::NotFound unless params[:url]
params = track_params.merge(ip: request.remote_ip)
if params[:topic_id].present? || params[:post_id].present?