diff options
author | Vitaliy @blackst0ne Klachkov <blackst0ne.ru@gmail.com> | 2017-10-11 20:03:19 +1100 |
---|---|---|
committer | Vitaliy @blackst0ne Klachkov <blackst0ne.ru@gmail.com> | 2017-10-11 20:03:19 +1100 |
commit | 64bb19069dba585c6e4622073e5140f052c2661a (patch) | |
tree | 385fd2ef99886de4cde4e4bbc2bd94204f81cd61 /app/controllers/projects/wikis_controller.rb | |
parent | 2a9147b747ded82e0970c3f8235e9d9e27bd0ab4 (diff) | |
download | gitlab-ce-64bb19069dba585c6e4622073e5140f052c2661a.tar.gz |
Add support for markdown preview to group milestonesmove_markdown_preview_to_concern
Diffstat (limited to 'app/controllers/projects/wikis_controller.rb')
-rw-r--r-- | app/controllers/projects/wikis_controller.rb | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/app/controllers/projects/wikis_controller.rb b/app/controllers/projects/wikis_controller.rb index a8ebdf5a4a9..f7a9c98629d 100644 --- a/app/controllers/projects/wikis_controller.rb +++ b/app/controllers/projects/wikis_controller.rb @@ -1,4 +1,6 @@ class Projects::WikisController < Projects::ApplicationController + include PreviewMarkdown + before_action :authorize_read_wiki! before_action :authorize_create_wiki!, only: [:edit, :create, :history] before_action :authorize_admin_wiki!, only: :destroy @@ -92,17 +94,6 @@ class Projects::WikisController < Projects::ApplicationController def git_access end - def preview_markdown - result = PreviewMarkdownService.new(@project, current_user, params).execute - - render json: { - body: view_context.markdown(result[:text], pipeline: :wiki, project_wiki: @project_wiki, page_slug: params[:id]), - references: { - users: result[:users] - } - } - end - private def load_project_wiki |