Commit 43a27fa8 authored by Giorgenes Gelatti's avatar Giorgenes Gelatti

Use file_path validator in pypi api

parent 28367335
...@@ -41,7 +41,7 @@ module API ...@@ -41,7 +41,7 @@ module API
end end
params do params do
requires :file_identifier, type: String, desc: 'The PyPi package file identifier', regexp: API::NO_SLASH_URL_PART_REGEX requires :file_identifier, type: String, desc: 'The PyPi package file identifier', file_path: true
end end
get 'files/*file_identifier', :txt do get 'files/*file_identifier', :txt do
...@@ -53,7 +53,7 @@ module API ...@@ -53,7 +53,7 @@ module API
end end
params do params do
requires :package_name, type: String, desc: 'The PyPi package name', regexp: API::NO_SLASH_URL_PART_REGEX requires :package_name, type: String, file_path: true, desc: 'The PyPi package name'
end end
get 'simple/*package_name', format: :txt do get 'simple/*package_name', format: :txt do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment