refactor: update resource id naming

This commit is contained in:
Steven
2024-03-20 20:39:16 +08:00
parent a3a4e37cb0
commit 7cc8b951a3
48 changed files with 704 additions and 693 deletions

View File

@@ -189,7 +189,7 @@ func (s *APIV2Service) SignUp(ctx context.Context, request *apiv2pb.SignUpReques
Nickname: request.Username,
PasswordHash: string(passwordHash),
}
if !util.ResourceNameMatcher.MatchString(strings.ToLower(create.Username)) {
if !util.UIDMatcher.MatchString(strings.ToLower(create.Username)) {
return nil, status.Errorf(codes.InvalidArgument, "invalid username: %s", create.Username)
}