Stripping whitespace from URL to avoid accidental duplicates.

This commit is contained in:
Roland 2021-11-15 10:40:33 -07:00
parent b33dabcbb0
commit 85271f8dbb
No known key found for this signature in database
GPG key ID: 9D6DBD3ACF11AB93

View file

@ -24,7 +24,8 @@ logger = logger.getChild(__name__)
)
@wrol_mode_check
async def post_archive(_: Request, data: dict):
url = data['url']
# Remove whitespace from URL.
url = data['url'].strip()
lib.new_archive(url)
return response.empty()