]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/api/nodes_controller.rb
Move default_format_xml to api_controller
[rails.git] / app / controllers / api / nodes_controller.rb
index dafb19ebd618a38c773eab92fa7cce26d1ac5a16..08f19008f730dc931e251b421ba2ca4dca134ca3 100644 (file)
@@ -13,6 +13,8 @@ module Api
     before_action :check_api_readable, :except => [:create, :update, :delete]
     around_action :api_call_handle_error, :api_call_timeout
 
+    before_action :default_format_xml
+
     # Create a node from XML.
     def create
       assert_method :put
@@ -34,6 +36,7 @@ module Api
         # Render the result
         respond_to do |format|
           format.xml
+          format.json
         end
       else
         head :gone
@@ -77,6 +80,7 @@ module Api
       # Render the result
       respond_to do |format|
         format.xml
+        format.json
       end
     end
   end