Skip to content

armgit / memos

Public Imported from GitHub
0

Memos is an open-source, self-hosted note-taking app that brings your everyday thoughts together in a personal timeline. Your data stays yours, and you choose what to keep private or share.

chore: update username matcher

Stevenad3487a9ac00
diff --git a/api/v1/auth.go b/api/v1/auth.go
index 030903a82..f27b36ccb 100644
--- a/api/v1/auth.go
+++ b/api/v1/auth.go
@@ -22,7 +22,7 @@ import (
)
var (
- usernameMatcher = regexp.MustCompile("^[a-z]([a-z0-9-]{2,30}[a-z0-9])?$")
+ usernameMatcher = regexp.MustCompile("^[a-z]([a-z0-9-]{1,30}[a-z0-9])?$")
)
type SignIn struct {
diff --git a/api/v2/user_service.go b/api/v2/user_service.go
index 7505c8267..474af0339 100644
--- a/api/v2/user_service.go
+++ b/api/v2/user_service.go
@@ -23,7 +23,7 @@ import (
)
var (
- usernameMatcher = regexp.MustCompile("^[a-z]([a-z0-9-]{2,30}[a-z0-9])?$")
+ usernameMatcher = regexp.MustCompile("^[a-z]([a-z0-9-]{1,30}[a-z0-9])?$")
)
type UserService struct {