From b7a1e2d795772e67b6e77edeca096f681225cd36 Mon Sep 17 00:00:00 2001 From: Steven Tang Date: Tue, 12 Jan 2021 21:05:07 +1100 Subject: [PATCH 1/2] Reduce minimum username length to 1 --- models/user.go | 2 +- views/login.tpl.html | 2 +- views/signup.tpl.html | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/models/user.go b/models/user.go index ccca907..9fcd8e4 100644 --- a/models/user.go +++ b/models/user.go @@ -43,7 +43,7 @@ func (s *Signup) IsValid() bool { } func validateUsername(username string) bool { - return len(username) >= 3 && username != "current" + return len(username) >= 1 && username != "current" } func validatePassword(password string) bool { diff --git a/views/login.tpl.html b/views/login.tpl.html index 358d40c..05e3dbd 100644 --- a/views/login.tpl.html +++ b/views/login.tpl.html @@ -20,7 +20,7 @@ + name="username" placeholder="Enter your username" minlength="1" required autofocus>
diff --git a/views/signup.tpl.html b/views/signup.tpl.html index f55c7de..0d51b35 100644 --- a/views/signup.tpl.html +++ b/views/signup.tpl.html @@ -23,7 +23,7 @@ rel="noopener noreferrer" class="border-b border-green-700">WakaTime client tools. - Please refer to this readme section for instructions. You will be able to view you API Key once you log in. @@ -35,7 +35,7 @@ + name="username" placeholder="Choose a username" minlength="1" required autofocus>
From a03e49e7f0d9feafdbf44941784a69ced2dbc206 Mon Sep 17 00:00:00 2001 From: Steven Tang Date: Tue, 12 Jan 2021 21:57:15 +1100 Subject: [PATCH 2/2] chore: increment version to 1.18.2 --- version.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.txt b/version.txt index ec6d649..b57fc72 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -1.18.1 +1.18.2