Add initial admin
[ZITADOPER-1]
This commit is contained in:
@@ -91,7 +91,10 @@ func newWrappedOrganizationReconciler(client client.Client, refResolver *zitadel
|
||||
}
|
||||
|
||||
func (wr *wrappedOrganizationReconciler) Reconcile(ctx context.Context, ztdClient *management.Client) error {
|
||||
resp, err := ztdClient.AddOrg(ctx, &pb.AddOrgRequest{Name: wr.organization.Name})
|
||||
// TODO: check if org exists first
|
||||
resp, err := ztdClient.AddOrg(ctx, &pb.AddOrgRequest{
|
||||
Name: wr.organization.Name,
|
||||
})
|
||||
if err != nil {
|
||||
if strings.Contains(err.Error(), "AlreadyExists") {
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user