discourse/plugins/discourse-post-voting/config/routes.rb
Jarek Radosz 5265fe7129
FEATURE: Restore the crawler view for post-voting comments (#39636)
Removed in 2022 because of perf considerations.

This restores it and updates the implementation and styling. The perf
should not be an issue anymore:

1. it's now rendered only in the crawler view (and not for regular
logged-in users or anons)
2. it previously used Rails' partial rendering which re-read file on
each request. `register_html_builder` is more efficient (and this
particular block skips rendering completely when not applicable)
2026-04-29 16:55:17 +02:00

14 lines
439 B
Ruby

# frozen_string_literal: true
PostVoting::Engine.routes.draw do
resource :vote
get "voters" => "votes#voters"
get "comments" => "comments#load_more_comments"
post "comments" => "comments#create"
delete "comments" => "comments#destroy"
put "comments" => "comments#update"
put "comments/flag" => "comments#flag"
post "vote/comment" => "votes#create_comment_vote"
delete "vote/comment" => "votes#destroy_comment_vote"
end