summaryrefslogtreecommitdiff
path: root/lib/api/wikis.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/api/wikis.rb')
-rw-r--r--lib/api/wikis.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/api/wikis.rb b/lib/api/wikis.rb
index 95afa36113c..0c3fb3c8093 100644
--- a/lib/api/wikis.rb
+++ b/lib/api/wikis.rb
@@ -101,11 +101,15 @@ module API
delete ':id/wikis/:slug' do
authorize! :admin_wiki, container
- WikiPages::DestroyService
+ response = WikiPages::DestroyService
.new(container: container, current_user: current_user)
.execute(wiki_page)
- no_content!
+ if response.success?
+ no_content!
+ else
+ render_api_error!(reponse.message)
+ end
end
desc 'Upload an attachment to the wiki repository' do