DEV: Update defer_track_visit method in line with core (#174)
When https://github.com/discourse/discourse/pull/27761 is merged in core the v2 method name is obsolete and we can call `defer_track_visit` once more.
This commit is contained in:
parent
0d9365571b
commit
7721b1646d
|
@ -55,9 +55,7 @@ module Docs
|
||||||
ip = request.remote_ip
|
ip = request.remote_ip
|
||||||
user_id = (current_user.id if current_user)
|
user_id = (current_user.id if current_user)
|
||||||
|
|
||||||
# TODO (martin) Change this to `defer_track_visit` once the core
|
TopicsController.defer_track_visit(topic.id, user_id) if should_track_visit_to_topic?
|
||||||
# method is renamed.
|
|
||||||
TopicsController.defer_track_visit_v2(topic.id, user_id) if should_track_visit_to_topic?
|
|
||||||
TopicsController.defer_topic_view(topic.id, ip, user_id)
|
TopicsController.defer_topic_view(topic.id, ip, user_id)
|
||||||
|
|
||||||
TopicViewSerializer.new(topic_view, scope: guardian, root: false)
|
TopicViewSerializer.new(topic_view, scope: guardian, root: false)
|
||||||
|
|
Loading…
Reference in New Issue