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:
Martin Brennan 2024-07-08 16:37:25 +10:00 committed by GitHub
parent 0d9365571b
commit 7721b1646d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 3 deletions

View File

@ -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)