diff options
| author | Robert | 2017-12-04 12:36:36 +0100 | 
|---|---|---|
| committer | Robert | 2017-12-04 12:36:36 +0100 | 
| commit | 614db1d28c8c8b8963a286cc0ffebf81b3acc8f2 (patch) | |
| tree | f633913c14117d8bf3ec4aa9d52a42eb0a265d76 | |
| parent | 6ec303e25dcb9a4f6d27420597dd8b7c5b1f165e (diff) | |
| download | chouette-core-614db1d28c8c8b8963a286cc0ffebf81b3acc8f2.tar.bz2 | |
Hotfix API Controller < ActionController::Base0000-post_to_json_hotfix_for_local_app
| -rw-r--r-- | app/controllers/api/v1/netex_imports_controller.rb | 6 | ||||
| -rw-r--r-- | app/services/http_service.rb | 1 | 
2 files changed, 4 insertions, 3 deletions
| diff --git a/app/controllers/api/v1/netex_imports_controller.rb b/app/controllers/api/v1/netex_imports_controller.rb index 8e8c48986..d86c1fcd8 100644 --- a/app/controllers/api/v1/netex_imports_controller.rb +++ b/app/controllers/api/v1/netex_imports_controller.rb @@ -1,9 +1,11 @@  module Api    module V1 -    class NetexImportsController < ChouetteController +    class NetexImportsController < ActionController::Base        include ControlFlow -      skip_before_action :authenticate + +      respond_to :json, :xml +      layout false        def create          respond_to do | format | diff --git a/app/services/http_service.rb b/app/services/http_service.rb index db4441395..c0cc1c59b 100644 --- a/app/services/http_service.rb +++ b/app/services/http_service.rb @@ -26,7 +26,6 @@ module HTTPService extend self    # params: { netex_import: {referential_id: 13, workbench_id: 1}},    # upload: {file: [StringIO.new('howdy'), 'application/zip', 'greeting']})    def post_resource(host:, path:, token: nil, params: {}, upload: nil) -    token = token || params      Faraday.new(url: host) do |c|        c.headers['Authorization'] = "Token token=#{token.inspect}" if token        c.request :multipart | 
