summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/api/project_snippets.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/api/project_snippets.rb b/lib/api/project_snippets.rb
index 46f70f2dc6b..bee6544ea3d 100644
--- a/lib/api/project_snippets.rb
+++ b/lib/api/project_snippets.rb
@@ -113,6 +113,8 @@ module API
# GET /projects/:id/snippets/:snippet_id/raw
get ":id/snippets/:snippet_id/raw" do
@snippet = user_project.snippets.find(params[:snippet_id])
+
+ env['api.format'] = :txt
content_type 'text/plain'
present @snippet.content
end