]> git.openstreetmap.org Git - rails.git/blob - app/controllers/api/user_blocks_controller.rb
Localisation updates from https://translatewiki.net.
[rails.git] / app / controllers / api / user_blocks_controller.rb
1 module Api
2   class UserBlocksController < ApiController
3     authorize_resource
4
5     before_action :set_request_formats
6
7     def show
8       raise OSM::APIBadUserInput, "No id was given" unless params[:id]
9
10       @user_block = UserBlock.find(params[:id])
11     rescue ActiveRecord::RecordNotFound
12       raise OSM::APINotFoundError
13     end
14   end
15 end