|
|
|
@ -36,7 +36,7 @@ class LibrariesController < ApplicationController
|
|
|
|
|
@library = current_user.libraries.new
|
|
|
|
|
Libraries::SaveService.new(@library, current_user, form_params).call
|
|
|
|
|
if with_publish?
|
|
|
|
|
Libraries::SubmitService.new(current_library).call
|
|
|
|
|
Libraries::SubmitService.new(@library).call
|
|
|
|
|
redirect_to publish_success_libraries_path
|
|
|
|
|
else
|
|
|
|
|
flash[:message] = '保存成功'
|
|
|
|
@ -58,7 +58,7 @@ class LibrariesController < ApplicationController
|
|
|
|
|
@library = current_library
|
|
|
|
|
Libraries::SaveService.new(@library, current_user, form_params).call
|
|
|
|
|
if with_publish?
|
|
|
|
|
Libraries::SubmitService.new(current_library).call
|
|
|
|
|
Libraries::SubmitService.new(@library).call
|
|
|
|
|
redirect_to publish_success_libraries_path
|
|
|
|
|
else
|
|
|
|
|
flash[:message] = '保存成功'
|
|
|
|
|