You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
10 lines
376 B
10 lines
376 B
class Admins::ImportUsersController < Admins::BaseController
|
|
def create
|
|
return render_error('请上传正确的文件') if params[:file].blank? || !params[:file].is_a?(ActionDispatch::Http::UploadedFile)
|
|
|
|
result = Admins::ImportUserService.call(params[:file].to_io)
|
|
render_ok(result)
|
|
rescue Admins::ImportUserService::Error => ex
|
|
render_error(ex)
|
|
end
|
|
end |