summaryrefslogtreecommitdiffstats
path: root/app/controllers/attachments_controller.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2016-04-12 19:18:34 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2016-04-12 19:18:34 +0000
commit130424fc3ed627142f487b495cfa70701e313939 (patch)
tree5f086c7d3c079bf007679b9b6f6c233202c8248e /app/controllers/attachments_controller.rb
parentdfb78be2a7d79925d35b1c25bf9a86f36f188cd9 (diff)
downloadredmine-130424fc3ed627142f487b495cfa70701e313939.tar.gz
redmine-130424fc3ed627142f487b495cfa70701e313939.zip
Support for deleting attachments via API (#14828).
Patch by Takenori TAKAKI. git-svn-id: http://svn.redmine.org/redmine/trunk@15332 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/attachments_controller.rb')
-rw-r--r--app/controllers/attachments_controller.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/controllers/attachments_controller.rb b/app/controllers/attachments_controller.rb
index d81b3d9b2..8c6b4484e 100644
--- a/app/controllers/attachments_controller.rb
+++ b/app/controllers/attachments_controller.rb
@@ -22,7 +22,7 @@ class AttachmentsController < ApplicationController
before_filter :delete_authorize, :only => :destroy
before_filter :authorize_global, :only => :upload
- accept_api_auth :show, :download, :thumbnail, :upload
+ accept_api_auth :show, :download, :thumbnail, :upload, :destroy
def show
respond_to do |format|
@@ -130,6 +130,7 @@ class AttachmentsController < ApplicationController
respond_to do |format|
format.html { redirect_to_referer_or project_path(@project) }
format.js
+ format.api { render_api_ok }
end
end