diff --git a/app/controllers/organizations_controller.rb b/app/controllers/organizations_controller.rb index 55da2a686..9df516786 100644 --- a/app/controllers/organizations_controller.rb +++ b/app/controllers/organizations_controller.rb @@ -62,9 +62,11 @@ class OrganizationsController < ApplicationController text_color_hex twitter_username github_username + cta_button_text + cta_button_url + cta_body_markdown ] - approved_params = %i(cta_button_text cta_button_url cta_body_markdown) - @organization&.approved ? accessible + approved_params : accessible + accessible end def organization_params diff --git a/app/services/article_api_index_service.rb b/app/services/article_api_index_service.rb index abfd8383d..9ab35ae84 100644 --- a/app/services/article_api_index_service.rb +++ b/app/services/article_api_index_service.rb @@ -84,10 +84,10 @@ class ArticleApiIndexService def state_articles(state) if state == "fresh" Article.where(published: true). - where("positive_reactions_count < ? AND featured_number > ?", 5, 7.hours.ago.to_i) + where("positive_reactions_count < ? AND featured_number > ? AND score > ?", 3, 7.hours.ago.to_i, -2) elsif state == "rising" Article.where(published: true). - where("positive_reactions_count > ? AND positive_reactions_count < ? AND featured_number > ?", 19, 27, 3.days.ago.to_i) + where("positive_reactions_count > ? AND positive_reactions_count < ? AND featured_number > ?", 19, 33, 3.days.ago.to_i) end end