diff options
| author | Zog | 2018-04-03 14:45:43 +0200 |
|---|---|---|
| committer | Zog | 2018-04-03 14:48:15 +0200 |
| commit | 3af91a4f5c6d761e444170908836166f115569b2 (patch) | |
| tree | 3843909d0b6ab722c2df3ee0c979049b86f2ffa3 /app/controllers/exports_controller.rb | |
| parent | 361ad6302d717acff9431d51126d8bf3a6143503 (diff) | |
| download | chouette-core-3af91a4f5c6d761e444170908836166f115569b2.tar.bz2 | |
Refs #6218; Upload files to exporters6218-upload_files_to_exporters
Diffstat (limited to 'app/controllers/exports_controller.rb')
| -rw-r--r-- | app/controllers/exports_controller.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/controllers/exports_controller.rb b/app/controllers/exports_controller.rb index a5282a514..c89da5000 100644 --- a/app/controllers/exports_controller.rb +++ b/app/controllers/exports_controller.rb @@ -3,13 +3,14 @@ class ExportsController < ChouetteController include RansackDateFilter include IevInterfaces skip_before_action :authenticate_user!, only: [:upload] + skip_before_action :verify_authenticity_token, only: [:upload] defaults resource_class: Export::Base, collection_name: 'exports', instance_name: 'export' def upload if params[:token] == resource.token_upload resource.file = params[:file] resource.save! - redirect_to [resource.workbench, resource] + render json: {status: :ok} else user_not_authorized end |
