updates to api

This commit is contained in:
Steve Coast 2007-05-10 19:37:33 +00:00
parent 9011118cd0
commit 21fd6d3126
3 changed files with 2 additions and 5 deletions

View file

@ -9,10 +9,6 @@ class ApiController < ApplicationController
#COUNT is the number of map requests to allow before exiting and starting a new process #COUNT is the number of map requests to allow before exiting and starting a new process
@@count = COUNT @@count = COUNT
def authorize_web
@current_user = User.find_by_token(session[:token])
end
# The maximum area you're allowed to request, in square degrees # The maximum area you're allowed to request, in square degrees
MAX_REQUEST_AREA = 0.25 MAX_REQUEST_AREA = 0.25

View file

@ -22,6 +22,7 @@ class SegmentController < ApplicationController
unless segment.preconditions_ok? # are the nodes visible? unless segment.preconditions_ok? # are the nodes visible?
render :nothing => true, :status => HTTP_PRECONDITION_FAILED render :nothing => true, :status => HTTP_PRECONDITION_FAILED
return
end end
if segment.save_with_history if segment.save_with_history

View file

@ -84,7 +84,7 @@ class Way < ActiveRecord::Base
end end
ordered_segments.each do |seg_id| ordered_segments.each do |seg_id|
if seg_id if seg_id and seg_id != '0'
e = XML::Node.new 'seg' e = XML::Node.new 'seg'
e['id'] = seg_id e['id'] = seg_id
el1 << e el1 << e