API: set content type for raw snippet

This commit is contained in:
Nihad Abbasov 2012-08-01 05:57:56 -07:00
parent 853ca74620
commit 058b71edf3

View file

@ -141,6 +141,7 @@ module Gitlab
# GET /projects/:id/snippets/:snippet_id/raw
get ":id/snippets/:snippet_id/raw" do
@snippet = user_project.snippets.find(params[:snippet_id])
content_type 'text/plain'
present @snippet.content
end