From 31b48ec512c62c3b70a005ba54cf78ea0755f5d5 Mon Sep 17 00:00:00 2001 From: Fijxu Date: Sat, 5 Apr 2025 16:44:05 -0300 Subject: [PATCH] Update src/invidious/routes/account.cr Co-authored-by: syeopite <70992037+syeopite@users.noreply.github.com> --- src/invidious/routes/account.cr | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/invidious/routes/account.cr b/src/invidious/routes/account.cr index 647e594c..0a9467c1 100644 --- a/src/invidious/routes/account.cr +++ b/src/invidious/routes/account.cr @@ -124,14 +124,10 @@ module Invidious::Routes::Account end new_username = env.params.body["new_username"]?.try &.downcase.byte_slice(0, 254) - if new_username.nil? + if new_username.nil? || new_username.empty? return error_template(401, "accounts_username_required_field") end - if new_username.empty? - return error_template(401, "accounts_username_empty") - end - if new_username == user.email return error_template(401, "accounts_username_is_the_same") end