diff options
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/application_controller.rb | 9 | ||||
-rw-r--r-- | app/controllers/wiki_controller.rb | 52 |
2 files changed, 45 insertions, 16 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 6c7779636..f5262e6d2 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -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 diff --git a/app/controllers/wiki_controller.rb b/app/controllers/wiki_controller.rb
index e8f6ef35d..51e2ef367 100644 --- a/app/controllers/wiki_controller.rb +++ b/generated by cgit v1.2.3 (git 2.39.1) at 2024-12-25 20:27:13 +0000 |