]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/api/permissions_controller.rb
JSON output added to permissions endpoint
[rails.git] / app / controllers / api / permissions_controller.rb
index 73b84f8edf341933483a9ee68341f9a2ec94b984..07685ed6806546e58a795f7cdb74ba61774e9be5 100644 (file)
@@ -4,6 +4,7 @@ module Api
 
     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 +22,11 @@ module Api
                      else
                        []
                      end
+
+      respond_to do |format|
+        format.xml
+        format.json
+      end
     end
   end
 end