From 1f340bf0540e4cf245961d9250d365b3d9f27623 Mon Sep 17 00:00:00 2001 From: Oliver Luethi Date: Wed, 23 Mar 2016 09:07:09 +0100 Subject: [PATCH] Delete attachments over REST API --- app/controllers/attachments_controller.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/attachments_controller.rb b/app/controllers/attachments_controller.rb index 6113957..3f304d0 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| @@ -128,6 +128,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 -- 1.9.4.msysgit.2