Make the multi-get calls throw 400 errors on invalid input
Also refactor ways and relations to use the same structure as nodes
This commit is contained in:
parent
ec9634d865
commit
a1a5706203
3 changed files with 31 additions and 23 deletions
|
@ -64,6 +64,10 @@ class NodeController < ApplicationController
|
|||
|
||||
# Dump the details on many nodes whose ids are given in the "nodes" parameter.
|
||||
def nodes
|
||||
if not params['nodes']
|
||||
raise OSM::APIBadUserInput.new("The parameter nodes is required, and must be of the form nodes=id[,id[,id...]]")
|
||||
end
|
||||
|
||||
ids = params['nodes'].split(',').collect { |n| n.to_i }
|
||||
|
||||
if ids.length == 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue