diff options
author | blackst0ne <blackst0ne.ru@gmail.com> | 2017-09-07 09:21:52 +1100 |
---|---|---|
committer | blackst0ne <blackst0ne.ru@gmail.com> | 2017-09-07 09:21:52 +1100 |
commit | 2915bb27078a3eae0bac36bd2c3a2e1c4998130c (patch) | |
tree | ab4edc3fea5a6b9ab9d475e4ac96ff435f966dad /lib/api/helpers.rb | |
parent | 367d3d97048df14bd5c3e5f33f67bb3bbc16c1c8 (diff) | |
download | gitlab-ce-2915bb27078a3eae0bac36bd2c3a2e1c4998130c.tar.gz |
Add API support for wiki pages
Diffstat (limited to 'lib/api/helpers.rb')
-rw-r--r-- | lib/api/helpers.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/api/helpers.rb b/lib/api/helpers.rb index b56fd2388b3..0932f8eb76f 100644 --- a/lib/api/helpers.rb +++ b/lib/api/helpers.rb @@ -35,6 +35,12 @@ module API @project ||= find_project!(params[:id]) end + def wiki_page + page = user_project.wiki.find_page(params[:slug]) + + page || not_found!('Wiki Page') + end + def available_labels @available_labels ||= LabelsFinder.new(current_user, project_id: user_project.id).execute end |