1
0
mirror of https://github.com/muety/wakapi.git synced 2023-08-10 21:12:56 +03:00

Merge pull request #85 from YC/master

Reduce minimum username length to 1
This commit is contained in:
Ferdinand Mütsch 2021-01-12 12:17:36 +01:00 committed by GitHub
commit a018f70c3f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 5 deletions

View File

@ -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 {

View File

@ -1 +1 @@
1.18.1
1.18.2

View File

@ -20,7 +20,7 @@
<label class="inline-block text-sm mb-1 text-gray-500" for="username">Username</label>
<input class="shadow appearance-none bg-gray-800 focus:bg-gray-700 text-gray-300 border-green-700 focus:border-gray-500 border rounded w-full py-1 px-3"
type="text" id="username"
name="username" placeholder="Enter your username" minlength="3" required autofocus>
name="username" placeholder="Enter your username" minlength="1" required autofocus>
</div>
<div class="mb-8">
<label class="inline-block text-sm mb-1 text-gray-500" for="password">Password</label>

View File

@ -23,7 +23,7 @@
rel="noopener noreferrer"
class="border-b border-green-700">WakaTime</a>
client tools.
Please refer to <a href="https://github.com/muety/wakapi#client-setup" target="_blank"
Please refer to <a href="https://github.com/muety/wakapi#-client-setup" target="_blank"
rel="noopener noreferrer"
class="border-b border-green-700">this readme section</a> for instructions.
You will be able to view you <strong>API Key</strong> once you log in.
@ -35,7 +35,7 @@
<label class="inline-block text-sm mb-1 text-gray-500" for="username">Username</label>
<input class="shadow appearance-none bg-gray-800 focus:bg-gray-700 text-gray-300 border-green-700 focus:border-gray-500 border rounded w-full py-1 px-3"
type="text" id="username"
name="username" placeholder="Choose a username" minlength="3" required autofocus>
name="username" placeholder="Choose a username" minlength="1" required autofocus>
</div>
<div class="mb-8">
<label class="inline-block text-sm mb-1 text-gray-500" for="password">Password</label>