diff options
author | Valery Sizov <valery@gitlab.com> | 2017-08-23 11:09:19 +0300 |
---|---|---|
committer | Valery Sizov <valery@gitlab.com> | 2017-08-23 11:09:19 +0300 |
commit | a4c0e612dbeb6a323ab645f6cd0f1f8a04bf474b (patch) | |
tree | 1daca61a37cba322ebf2cd1e3f3102d51579798f | |
parent | 2a483d4fd8ce493fd0ffca0a8c8214b48b6bfa86 (diff) | |
download | gitlab-ce-discussion_diff_endpoint.tar.gz |
Create JSON end-point to get discussion diffdiscussion_diff_endpoint
-rw-r--r-- | app/controllers/projects/discussions_controller.rb | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/app/controllers/projects/discussions_controller.rb b/app/controllers/projects/discussions_controller.rb index 498d78ff587..00db4897984 100644 --- a/app/controllers/projects/discussions_controller.rb +++ b/app/controllers/projects/discussions_controller.rb @@ -22,9 +22,7 @@ class Projects::DiscussionsController < Projects::ApplicationController end def show - render json: { - discussion_html: view_to_html_string('discussions/_diff_with_notes', discussion: discussion) - } + render json: discussion.truncated_diff_lines.to_json end private |