diff options
author | Go MAEDA <maeda@farend.jp> | 2019-09-09 08:57:29 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2019-09-09 08:57:29 +0000 |
commit | 780e64a100d620574b0afa3cd8317dc4255344ad (patch) | |
tree | a432eaf352199f3d93bf97e3718e9b55d9c0aae8 /app | |
parent | 3ca75647dfbc3c41f11f202b436a1463cca8236c (diff) | |
download | redmine-780e64a100d620574b0afa3cd8317dc4255344ad.tar.gz redmine-780e64a100d620574b0afa3cd8317dc4255344ad.zip |
REST API for deleting news (#13468).
Patch by Takenori TAKAKI.
git-svn-id: http://svn.redmine.org/redmine/trunk@18442 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/news_controller.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/app/controllers/news_controller.rb b/app/controllers/news_controller.rb index 6c1e7f1bd..3ea0abea7 100644 --- a/app/controllers/news_controller.rb +++ b/app/controllers/news_controller.rb @@ -26,7 +26,7 @@ class NewsController < ApplicationController before_action :authorize, :except => [:index] before_action :find_optional_project, :only => :index accept_rss_auth :index - accept_api_auth :index, :show, :create + accept_api_auth :index, :show, :create, :destroy helper :watchers helper :attachments @@ -106,6 +106,9 @@ class NewsController < ApplicationController def destroy @news.destroy - redirect_to project_news_index_path(@project) + respond_to do |format| + format.html { redirect_to project_news_index_path(@project) } + format.api { render_api_ok } + end end end |