Skip to content

Commit 980b2fb

Browse files
authored
feat/ui units (#2327)
* add units elements * implement mocked units * fix units * add workos webhook and id * fix changes
1 parent 7dee01e commit 980b2fb

29 files changed

+1635
-767
lines changed

taco/internal/domain/organization.go

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ var (
1414
ErrInvalidOrgID = errors.New("invalid organization ID format")
1515
)
1616

17-
// OrgIDPattern defines valid organization ID format: lowercase alphanumeric, hyphens, underscores
18-
var OrgIDPattern = regexp.MustCompile(`^[a-z0-9][a-z0-9_-]*[a-z0-9]$`)
17+
// OrgIDPattern defines valid organization ID format: alphanumeric, hyphens, underscores
18+
var OrgIDPattern = regexp.MustCompile(`^[a-zA-Z0-9][a-zA-Z0-9_-]*[a-zA-Z0-9]$`)
1919

2020
// ============================================
2121
// Domain Models
@@ -69,13 +69,13 @@ var (
6969
type UserRepository interface {
7070
// Create or get a user (idempotent)
7171
EnsureUser(ctx context.Context, subject, email string) (*User, error)
72-
72+
7373
// Get user by subject
7474
Get(ctx context.Context, subject string) (*User, error)
75-
75+
7676
// Get user by email
7777
GetByEmail(ctx context.Context, email string) (*User, error)
78-
78+
7979
// List all users
8080
List(ctx context.Context) ([]*User, error)
8181
}
@@ -94,9 +94,7 @@ func ValidateOrgID(orgID string) error {
9494
return fmt.Errorf("%w: must be at most 50 characters", ErrInvalidOrgID)
9595
}
9696
if !OrgIDPattern.MatchString(orgID) {
97-
return fmt.Errorf("%w: must contain only lowercase letters, numbers, hyphens, and underscores", ErrInvalidOrgID)
97+
return fmt.Errorf("%w: must contain only letters, numbers, hyphens, and underscores", ErrInvalidOrgID)
9898
}
9999
return nil
100100
}
101-
102-

0 commit comments

Comments
 (0)