Commit 6cec9ed3283a611a40b6df981ed00ccaa1bd0e73

Authored by Saito
1 parent b664b784

linguist will take care of this

Showing 1 changed file with 4 additions and 10 deletions   Show diff stats
lib/api/projects.rb
... ... @@ -147,7 +147,7 @@ module Gitlab
147 147 @hooks = paginate user_project.hooks
148 148 present @hooks, with: Entities::Hook
149 149 end
150   -
  150 +
151 151 # Get a project hook
152 152 #
153 153 # Parameters:
... ... @@ -159,7 +159,7 @@ module Gitlab
159 159 @hook = user_project.hooks.find(params[:hook_id])
160 160 present @hook, with: Entities::Hook
161 161 end
162   -
  162 +
163 163  
164 164 # Add hook to project
165 165 #
... ... @@ -177,7 +177,7 @@ module Gitlab
177 177 error!({'message' => '404 Not found'}, 404)
178 178 end
179 179 end
180   -
  180 +
181 181 # Update an existing project hook
182 182 #
183 183 # Parameters:
... ... @@ -382,13 +382,7 @@ module Gitlab
382 382 tree = Tree.new commit.tree, user_project, ref, params[:filepath]
383 383 not_found! "File" unless tree.try(:tree)
384 384  
385   - if tree.text?
386   - encoding = Gitlab::Encode.detect_encoding(tree.data)
387   - content_type encoding ? "text/plain; charset=#{encoding}" : "text/plain"
388   - else
389   - content_type tree.mime_type
390   - end
391   -
  385 + content_type tree.mime_type
392 386 present tree.data
393 387 end
394 388  
... ...