Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions config/routes.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
Rails.application.routes.draw do
not_found_response = ->(env) { [404, {}, []] }

BatchRequestApi.config.batch_sequential_paths.each do |batch_sequential_path|
post batch_sequential_path, constraints: { format: :json }
post batch_sequential_path, constraints: { format: :json }, to: not_found_response
end

BatchRequestApi.config.batch_parallel_paths.each do |batch_parallel_path|
post batch_parallel_path, constraints: { format: :json }
post batch_parallel_path, constraints: { format: :json }, to: not_found_response
end
end