1 class BrowseController < ApplicationController
4 before_action :authorize_web
5 before_action :set_locale
6 before_action -> { check_database_readable(:need_api => true) }
7 before_action :require_oauth
8 before_action :update_totp, :only => [:query]
9 around_action :web_timeout
10 authorize_resource :class => false
14 @feature = Relation.preload(:relation_tags, :containing_relation_members, :changeset => [:changeset_tags, :user], :relation_members => :member).find(params[:id])
16 rescue ActiveRecord::RecordNotFound
17 render :action => "not_found", :status => :not_found
22 @feature = Relation.preload(:relation_tags, :old_relations => [:old_tags, { :changeset => [:changeset_tags, :user], :old_members => :member }]).find(params[:id])
24 rescue ActiveRecord::RecordNotFound
25 render :action => "not_found", :status => :not_found
30 @feature = Way.preload(:way_tags, :containing_relation_members, :changeset => [:changeset_tags, :user], :nodes => [:node_tags, { :ways => :way_tags }]).find(params[:id])
32 rescue ActiveRecord::RecordNotFound
33 render :action => "not_found", :status => :not_found
38 @feature = Way.preload(:way_tags, :old_ways => [:old_tags, { :changeset => [:changeset_tags, :user], :old_nodes => { :node => [:node_tags, :ways] } }]).find(params[:id])
40 rescue ActiveRecord::RecordNotFound
41 render :action => "not_found", :status => :not_found
46 @feature = Node.preload(:node_tags, :containing_relation_members, :changeset => [:changeset_tags, :user], :ways => :way_tags).find(params[:id])
48 rescue ActiveRecord::RecordNotFound
49 render :action => "not_found", :status => :not_found
54 @feature = Node.preload(:node_tags, :old_nodes => [:old_tags, { :changeset => [:changeset_tags, :user] }]).find(params[:id])
56 rescue ActiveRecord::RecordNotFound
57 render :action => "not_found", :status => :not_found