summaryrefslogtreecommitdiff
path: root/app/controllers/concerns/preview_markdown.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/concerns/preview_markdown.rb')
-rw-r--r--app/controllers/concerns/preview_markdown.rb10
1 files changed, 3 insertions, 7 deletions
diff --git a/app/controllers/concerns/preview_markdown.rb b/app/controllers/concerns/preview_markdown.rb
index 4189b8dcf96..1d84ddfba97 100644
--- a/app/controllers/concerns/preview_markdown.rb
+++ b/app/controllers/concerns/preview_markdown.rb
@@ -9,10 +9,11 @@ module PreviewMarkdown
markdown_params =
case controller_name
+ when 'wikis' then { pipeline: :wiki, project_wiki: @project_wiki, page_slug: params[:id] }
when 'snippets' then { skip_project_check: true }
when 'groups' then { group: group }
when 'projects' then projects_filter_params
- else preview_markdown_params
+ else {}
end
render json: {
@@ -24,7 +25,6 @@ module PreviewMarkdown
}
}
end
- # rubocop:enable Gitlab/ModuleWithInstanceVariables
private
@@ -35,12 +35,8 @@ module PreviewMarkdown
}
end
- # Override this method to customise the markdown for your controller
- def preview_markdown_params
- {}
- end
-
def markdown_service_params
params
end
+ # rubocop:enable Gitlab/ModuleWithInstanceVariables
end