mirror of
https://github.com/discourse/discourse.git
synced 2025-06-05 14:07:30 +08:00
FEATURE: topic_view_stats table with daily fidelity (#27197)
This gives us daily fidelity of topic view stats New table stores a row per topic viewed per day tracking anonymous and logged on views We also have a new endpoint `/t/ID/views-stats.json` to get the statistics for the topic.
This commit is contained in:
@ -1583,6 +1583,9 @@ Discourse::Application.routes.draw do
|
||||
constraints: HomePageConstraint.new("#{filter}"),
|
||||
as: "list_#{filter}"
|
||||
end
|
||||
|
||||
get "/t/:topic_id/view-stats.json" => "topic_view_stats#index"
|
||||
|
||||
# special case for categories
|
||||
root to: "categories#index",
|
||||
constraints: HomePageConstraint.new("categories"),
|
||||
|
Reference in New Issue
Block a user