Commit d1bfb385 by Ivan Lan

增加 export_headers api

parent 81027e5e
...@@ -56,6 +56,10 @@ class SimpleController::BaseController < ::InheritedResources::Base ...@@ -56,6 +56,10 @@ class SimpleController::BaseController < ::InheritedResources::Base
render json: response, status: 201 render json: response, status: 201
end end
def export_headers
render json: { headers: exportable_class.export_instance.export_headers }
end
def export def export
url = exportable_class.export_xlsx collection, **params.to_unsafe_h.symbolize_keys url = exportable_class.export_xlsx collection, **params.to_unsafe_h.symbolize_keys
render json: { url: url }, status: 201 render json: { url: url }, status: 201
......
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