Update authentication.cr

This commit is contained in:
Ryan G 2023-06-12 19:38:45 -07:00
parent 60ef753fd1
commit 022d9f76bf

View File

@ -19,10 +19,10 @@ module Invidious::Routes::API::V1::Authentication
if creds
# user is registering
username = creds.username
username ||= ""
username = "" if username.nil?
username = creds.username.downcase
password = "" if password.nil?
password = creds.password
password ||= ""
if username.empty?
return error_json(401, "Username cannot be empty")