REST API for creating/updating wiki pages (#7082).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10717 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2012-10-25 20:38:29 +00:00
parent 9e31308720
commit eff874b29a
5 changed files with 173 additions and 48 deletions

View File

@@ -553,8 +553,13 @@ class ApplicationController < ActionController::Base
# Renders a 200 response for successfull updates or deletions via the API
def render_api_ok
# head :ok would return a response body with one space
render :text => '', :status => :ok, :layout => nil
render_api_head :ok
end
# Renders a head API response
def render_api_head(status)
# #head would return a response body with one space
render :text => '', :status => status, :layout => nil
end
# Renders API response on validation failure