Fix tenant not found when creating new organinzation
Signed-off-by: gearnode <bryan@frimin.fr>
This commit is contained in:
@@ -178,8 +178,7 @@ func (r *mutationResolver) DeletePeople(ctx context.Context, input types.DeleteP
|
|||||||
|
|
||||||
// CreateOrganization is the resolver for the createOrganization field.
|
// CreateOrganization is the resolver for the createOrganization field.
|
||||||
func (r *mutationResolver) CreateOrganization(ctx context.Context, input types.CreateOrganizationInput) (*types.CreateOrganizationPayload, error) {
|
func (r *mutationResolver) CreateOrganization(ctx context.Context, input types.CreateOrganizationInput) (*types.CreateOrganizationPayload, error) {
|
||||||
// TODO: fix does not work now
|
svc := r.proboSvc.WithTenant(gid.NewTenantID())
|
||||||
svc := r.GetTenantServiceIfAuthorized(ctx, gid.NewTenantID())
|
|
||||||
|
|
||||||
organization, err := svc.Organizations.Create(ctx, probo.CreateOrganizationRequest{
|
organization, err := svc.Organizations.Create(ctx, probo.CreateOrganizationRequest{
|
||||||
Name: input.Name,
|
Name: input.Name,
|
||||||
|
|||||||
Reference in New Issue
Block a user