mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 06:14:12 +08:00
fix the build
This commit is contained in:
@ -159,14 +159,7 @@ class ApplicationController < ActionController::Base
|
||||
(request.xhr?) ||
|
||||
((params[:external_id] || '').ends_with? '.json')
|
||||
|
||||
invalid_user =
|
||||
begin
|
||||
current_user
|
||||
rescue Discourse::InvalidAccess
|
||||
nil
|
||||
end
|
||||
|
||||
if show_json_errors || invalid_user
|
||||
if show_json_errors
|
||||
# HACK: do not use render_json_error for topics#show
|
||||
if request.params[:controller] == 'topics' && request.params[:action] == 'show'
|
||||
return render status: status_code, layout: false, plain: (status_code == 404 || status_code == 410) ? build_not_found_page(status_code) : I18n.t(type)
|
||||
|
Reference in New Issue
Block a user