diff options
author | Felipe Artur <felipefac@gmail.com> | 2017-08-10 16:16:54 -0300 |
---|---|---|
committer | Felipe Artur <felipefac@gmail.com> | 2017-08-15 11:32:48 -0300 |
commit | b7e98620046501144302ff8f9fbf22ff03ef4db7 (patch) | |
tree | 2cf1711f0f6f2b9576f624885de28062b50228f6 /lib/api/files.rb | |
parent | fe09c25d68a61c5874e9beb0f018c05a4d789d70 (diff) | |
download | gitlab-ce-b7e98620046501144302ff8f9fbf22ff03ef4db7.tar.gz |
Fix API responses when dealing with txt filesissue_31790
Diffstat (limited to 'lib/api/files.rb')
-rw-r--r-- | lib/api/files.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/api/files.rb b/lib/api/files.rb index 450334fee84..e2ac7142bc4 100644 --- a/lib/api/files.rb +++ b/lib/api/files.rb @@ -1,5 +1,8 @@ module API class Files < Grape::API + # Prevents returning plain/text responses for files with .txt extension + after_validation { content_type "application/json" } + helpers do def commit_params(attrs) { |