Make edits return version numbers as plain text strings
This commit is contained in:
parent
013ef53c97
commit
7a216c0ce6
3 changed files with 7 additions and 6 deletions
|
@ -52,7 +52,7 @@ class NodeController < ApplicationController
|
|||
|
||||
if new_node and new_node.id == node.id
|
||||
node.update_from(new_node, @user)
|
||||
render :nothing => true
|
||||
render :text => node.version.to_s, :content_type => "text/plain"
|
||||
else
|
||||
render :nothing => true, :status => :bad_request
|
||||
end
|
||||
|
|
|
@ -52,6 +52,7 @@ class RelationController < ApplicationController
|
|||
|
||||
if new_relation and new_relation.id == relation.id
|
||||
relation.update_from new_relation, user
|
||||
render :text => relation.version.to_s, :content_type => "text/plain"
|
||||
else
|
||||
render :nothing => true, :status => :bad_request
|
||||
end
|
||||
|
|
|
@ -52,7 +52,7 @@ class WayController < ApplicationController
|
|||
|
||||
if new_way and new_way.id == way.id
|
||||
way.update_from(new_way, @user)
|
||||
render :nothing => true
|
||||
render :text => way.version.to_s, :content_type => "text/plain"
|
||||
else
|
||||
render :nothing => true, :status => :bad_request
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue