diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-17 21:10:01 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-17 21:10:01 +0300 |
commit | 18da92341dac366b7bcfd13f2d3c443ffa315af0 (patch) | |
tree | 5189d9098a95d03d0b2b056f318a3637d9f547a7 /app/services/wiki_pages | |
parent | 073ebdcae8630bbcc849f7cfb4c27fd81bef99a5 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/services/wiki_pages')
-rw-r--r-- | app/services/wiki_pages/create_service.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/services/wiki_pages/create_service.rb b/app/services/wiki_pages/create_service.rb index 63107445782..9702876effa 100644 --- a/app/services/wiki_pages/create_service.rb +++ b/app/services/wiki_pages/create_service.rb @@ -10,7 +10,11 @@ module WikiPages execute_hooks(page) end - page + if page.persisted? + ServiceResponse.success(payload: { page: page }) + else + ServiceResponse.error(message: _('Could not create wiki page'), payload: { page: page }) + end end def usage_counter_action |