]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/browse_controller.rb
Use with_locale for the copyright page
[rails.git] / app / controllers / browse_controller.rb
index 50d0ae0a545e60b130331aabbbeb5764331a540c..88871a9e127b03b17249f86ad8b8b16b851d1f5d 100644 (file)
@@ -5,6 +5,7 @@ class BrowseController < ApplicationController
   before_action :set_locale
   before_action -> { check_database_readable(:need_api => true) }
   before_action :require_oauth
+  before_action :update_totp, :only => [:query]
   around_action :web_timeout
   authorize_resource :class => false
 
@@ -75,17 +76,5 @@ class BrowseController < ApplicationController
     render :action => "not_found", :status => :not_found
   end
 
-  def note
-    @type = "note"
-
-    if current_user&.moderator?
-      @note = Note.find(params[:id])
-      @note_comments = @note.comments.unscope(:where => :visible)
-    else
-      @note = Note.visible.find(params[:id])
-      @note_comments = @note.comments
-    end
-  rescue ActiveRecord::RecordNotFound
-    render :action => "not_found", :status => :not_found
-  end
+  def query; end
 end