]> git.openstreetmap.org Git - rails.git/blob - app/controllers/api/user_blocks_controller.rb
Merge remote-tracking branch 'upstream/pull/4639'
[rails.git] / app / controllers / api / user_blocks_controller.rb
1 module Api
2   class UserBlocksController < ApiController
3     before_action :check_api_readable
4
5     authorize_resource
6
7     around_action :api_call_handle_error, :api_call_timeout
8     before_action :set_request_formats
9
10     def show
11       raise OSM::APIBadUserInput, "No id was given" unless params[:id]
12
13       @user_block = UserBlock.find(params[:id])
14     rescue ActiveRecord::RecordNotFound
15       raise OSM::APINotFoundError
16     end
17   end
18 end