Commit 058b71edf3eed2aa2f4f664a0731e52c57b157ce

Authored by Nihad Abbasov
1 parent 853ca746

API: set content type for raw snippet

Showing 1 changed file with 1 additions and 0 deletions   Show diff stats
lib/api/projects.rb
@@ -141,6 +141,7 @@ module Gitlab @@ -141,6 +141,7 @@ module Gitlab
141 # GET /projects/:id/snippets/:snippet_id/raw 141 # GET /projects/:id/snippets/:snippet_id/raw
142 get ":id/snippets/:snippet_id/raw" do 142 get ":id/snippets/:snippet_id/raw" do
143 @snippet = user_project.snippets.find(params[:snippet_id]) 143 @snippet = user_project.snippets.find(params[:snippet_id])
  144 + content_type 'text/plain'
144 present @snippet.content 145 present @snippet.content
145 end 146 end
146 147