summaryrefslogtreecommitdiff
path: root/lib/api/helpers.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/api/helpers.rb')
-rw-r--r--lib/api/helpers.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/api/helpers.rb b/lib/api/helpers.rb
index 714d4ea3dc6..f00937ce94c 100644
--- a/lib/api/helpers.rb
+++ b/lib/api/helpers.rb
@@ -338,7 +338,7 @@ module API
end
def project_order_by
- order_fields = %w(id name path created_at updated_at last_activity_at)
+ order_fields = %w[id name path created_at updated_at last_activity_at]
if order_fields.include?(params['order_by'])
params['order_by']
@@ -367,7 +367,7 @@ module API
# sanitize file paths
# this requires all paths to exist
- required_attributes! %W(#{field}.path)
+ required_attributes! %W[#{field}.path]
uploads_path = File.realpath(uploads_path)
file_path = File.realpath(params["#{field}.path"])
bad_request!('Bad file path') unless file_path.start_with?(uploads_path)