forked from baron/baron-sso
가입 전략 수립
This commit is contained in:
@@ -15,7 +15,7 @@ type TenantRepository interface {
|
||||
FindByName(ctx context.Context, name string) (*domain.Tenant, error)
|
||||
FindByDomain(ctx context.Context, domainName string) (*domain.Tenant, error)
|
||||
FindByIDs(ctx context.Context, ids []string) ([]domain.Tenant, error)
|
||||
AddDomain(ctx context.Context, tenantID string, domainName string) error
|
||||
AddDomain(ctx context.Context, tenantID string, domainName string, verified bool) error
|
||||
}
|
||||
|
||||
type tenantRepository struct {
|
||||
@@ -82,11 +82,11 @@ func (r *tenantRepository) FindByIDs(ctx context.Context, ids []string) ([]domai
|
||||
return tenants, nil
|
||||
}
|
||||
|
||||
func (r *tenantRepository) AddDomain(ctx context.Context, tenantID string, domainName string) error {
|
||||
func (r *tenantRepository) AddDomain(ctx context.Context, tenantID string, domainName string, verified bool) error {
|
||||
td := domain.TenantDomain{
|
||||
TenantID: tenantID,
|
||||
Domain: domainName,
|
||||
Verified: true, // Auto-verify for internal init/admin usage for now
|
||||
Verified: verified,
|
||||
}
|
||||
return r.db.WithContext(ctx).Create(&td).Error
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user