Skip to content

Commit

Permalink
Clean up unnecessary logs (forem#21333)
Browse files Browse the repository at this point in the history
  • Loading branch information
benhalpern authored Oct 16, 2024
1 parent 5803033 commit 88336eb
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 10 deletions.
3 changes: 0 additions & 3 deletions app/controllers/articles_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -273,10 +273,8 @@ def base_editor_assignments

def handle_user_or_organization_feed
if (@user = User.find_by(username: params[:username]))
Honeycomb.add_field("articles_route", "user")
@articles = @articles.where(user_id: @user.id)
elsif (@user = Organization.find_by(slug: params[:username]))
Honeycomb.add_field("articles_route", "org")
@articles = @articles.where(organization_id: @user.id).includes(:user)
end
end
Expand All @@ -297,7 +295,6 @@ def set_article
Article.includes(:user).find(params[:id])
end
@article = found_article || not_found
Honeycomb.add_field("article_id", @article.id)
end

# TODO: refactor all of this update logic into the Articles::Updater possibly,
Expand Down
4 changes: 0 additions & 4 deletions app/controllers/stories_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -111,20 +111,16 @@ def handle_user_or_organization_or_podcast_or_page_index
@organization = Organization.find_by(slug: params[:username])
@page = Page.find_by(slug: params[:username], is_top_level_path: true)
if @podcast
Honeycomb.add_field("stories_route", "podcast")
handle_podcast_index
elsif @organization
Honeycomb.add_field("stories_route", "org")
handle_organization_index
elsif @page
if FeatureFlag.accessible?(@page.feature_flag_name, current_user)
Honeycomb.add_field("stories_route", "page")
handle_page_display
else
not_found
end
else
Honeycomb.add_field("stories_route", "user")
handle_user_index
end
end
Expand Down
3 changes: 0 additions & 3 deletions app/controllers/users_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,6 @@ def update
format.html { redirect_to "/settings/#{@tab}" }
end
else
Honeycomb.add_field("error", @user.errors.messages.compact_blank)
Honeycomb.add_field("errored", true)

error_message = @user.errors.full_messages.join(", ")

respond_to do |format|
Expand Down

0 comments on commit 88336eb

Please sign in to comment.