]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/api/permissions_controller.rb
Truncate descriptions horizontally in changeset lists
[rails.git] / app / controllers / api / permissions_controller.rb
index 73b84f8edf341933483a9ee68341f9a2ec94b984..8c0c949dc2c71302f64b1611f2977961a71d7718 100644 (file)
@@ -1,9 +1,11 @@
 module Api
   class PermissionsController < ApiController
+    before_action :check_api_readable
+
     authorize_resource :class => false
 
-    before_action :check_api_readable
     before_action :setup_user_auth
+    before_action :set_request_formats
     around_action :api_call_handle_error, :api_call_timeout
 
     # External apps that use the api are able to query which permissions
@@ -21,6 +23,11 @@ module Api
                      else
                        []
                      end
+
+      respond_to do |format|
+        format.xml
+        format.json
+      end
     end
   end
 end