Commit bd2ebf37 authored by James Lopez's avatar James Lopez

use worker in controller

parent 17cfce7a
...@@ -191,8 +191,7 @@ class ProjectsController < Projects::ApplicationController ...@@ -191,8 +191,7 @@ class ProjectsController < Projects::ApplicationController
end end
def export def export
#TODO: Move to worker @project.add_export_job(current_user_id: current_user.id)
::Projects::ImportExport::ExportService.new(@project, current_user).execute
redirect_to( redirect_to(
edit_project_path(@project), edit_project_path(@project),
...@@ -201,7 +200,11 @@ class ProjectsController < Projects::ApplicationController ...@@ -201,7 +200,11 @@ class ProjectsController < Projects::ApplicationController
end end
def download_export def download_export
send_file export_project_path, disposition: 'attachment' if export_project_path
send_file export_project_path, disposition: 'attachment'
else
render_404
end
end end
def toggle_star def toggle_star
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment