mirror of
https://github.com/iv-org/invidious.git
synced 2025-08-28 15:38:30 +00:00
Update authentication.cr
This commit is contained in:
parent
63c31a9217
commit
60ef753fd1
@ -20,15 +20,9 @@ module Invidious::Routes::API::V1::Authentication
|
|||||||
if creds
|
if creds
|
||||||
# user is registering
|
# user is registering
|
||||||
username = creds.username
|
username = creds.username
|
||||||
|
username ||= ""
|
||||||
password = creds.password
|
password = creds.password
|
||||||
|
password ||= ""
|
||||||
if username.nil? || username.empty?
|
|
||||||
return error_json(401, "User ID is a required field")
|
|
||||||
end
|
|
||||||
|
|
||||||
if password.nil? || password.empty?
|
|
||||||
return error_json(401, "Password is a required field")
|
|
||||||
end
|
|
||||||
|
|
||||||
if username.empty?
|
if username.empty?
|
||||||
return error_json(401, "Username cannot be empty")
|
return error_json(401, "Username cannot be empty")
|
||||||
|
Loading…
Reference in New Issue
Block a user