Skip to content

Commit

Permalink
[modify] remove unnecessary rss generation
Browse files Browse the repository at this point in the history
  • Loading branch information
sunny4381 committed May 27, 2021
1 parent 08f0f2e commit 917c69f
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 19 deletions.
10 changes: 1 addition & 9 deletions app/controllers/category/agents/tasks/node/nodes_controller.rb
Expand Up @@ -3,14 +3,6 @@ class Category::Agents::Tasks::Node::NodesController < ApplicationController
include Cms::GeneratorFilter::Rss

def generate
written = generate_node_with_pagination @node

# initialize context before generating rss
init_context
if generate_node_rss @node
@task.log "#{@node.url}rss.xml" if @task
end

written
generate_node_with_pagination @node
end
end
10 changes: 1 addition & 9 deletions app/controllers/cms/agents/tasks/node/nodes_controller.rb
Expand Up @@ -3,14 +3,6 @@ class Cms::Agents::Tasks::Node::NodesController < ApplicationController
include Cms::GeneratorFilter::Rss

def generate
written = generate_node_with_pagination @node

# initialize context before generating rss
init_context
if generate_node_rss @node
@task.log "#{@node.url}rss.xml" if @task
end

written
generate_node_with_pagination @node
end
end
1 change: 0 additions & 1 deletion config/routes/category/routes.rb
Expand Up @@ -27,7 +27,6 @@

node "category" do
get "node/(index.:format)" => "public#index", cell: "nodes/node"
get "node/rss.xml" => "public#rss", cell: "nodes/page", format: "xml"
get "page/(index.:format)" => "public#index", cell: "nodes/page"
get "page/rss.xml" => "public#rss", cell: "nodes/page", format: "xml"
end
Expand Down

0 comments on commit 917c69f

Please sign in to comment.