Skip to content

Commit

Permalink
fix for CR
Browse files Browse the repository at this point in the history
  • Loading branch information
RazcoDev committed Jun 27, 2024
1 parent ef46f7d commit 52f9017
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 11 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/permitio/permit-golang

go 1.18
go 1.17

require (
github.com/google/uuid v1.4.0
Expand Down
3 changes: 1 addition & 2 deletions pkg/api/relationshipTuples.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ func NewRelationshipTuplesApi(client *openapi.APIClient, config *config.PermitCo
}
}
func (u *RelationshipTuples) WaitForSync(timeout *time.Duration) *RelationshipTuples {
u.PermitBaseFactsApi.WaitForSync(timeout)
return u
return NewRelationshipTuplesApi(u.PermitBaseFactsApi.WaitForSync(timeout).client, u.config)
}

func (r *RelationshipTuples) Create(
Expand Down
3 changes: 1 addition & 2 deletions pkg/api/resourceInstances.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ func NewResourceInstancesApi(client *openapi.APIClient, config *config.PermitCon
}

func (r *ResourceInstances) WaitForSync(timeout *time.Duration) *ResourceInstances {
r.PermitBaseFactsApi.WaitForSync(timeout)
return r
return NewResourceInstancesApi(r.PermitBaseFactsApi.WaitForSync(timeout).client, r.config)
}

func (r *ResourceInstances) Create(
Expand Down
3 changes: 1 addition & 2 deletions pkg/api/roleAssignments.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ func NewRoleAssignmentsApi(client *openapi.APIClient, config *config.PermitConfi
}

func (r *RoleAssignments) WaitForSync(timeout *time.Duration) *RoleAssignments {
r.PermitBaseFactsApi.WaitForSync(timeout)
return r
return NewRoleAssignmentsApi(r.PermitBaseFactsApi.WaitForSync(timeout).client, r.config)
}

func (r *RoleAssignments) List(ctx context.Context, page int, perPage int, userFilter, roleFilter, tenantFilter string) (*[]models.RoleAssignmentRead, error) {
Expand Down
3 changes: 1 addition & 2 deletions pkg/api/tenants.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ func NewTenantsApi(client *openapi.APIClient, config *config.PermitConfig) *Tena
}

func (t *Tenants) WaitForSync(timeout *time.Duration) *Tenants {
t.PermitBaseFactsApi.WaitForSync(timeout)
return t
return NewTenantsApi(t.PermitBaseFactsApi.WaitForSync(timeout).client, t.config)
}

// List all tenants under the context's environment.
Expand Down
3 changes: 1 addition & 2 deletions pkg/api/users.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ func NewUsersApi(client *openapi.APIClient, config *config.PermitConfig) *Users
}

func (u *Users) WaitForSync(timeout *time.Duration) *Users {
u.PermitBaseFactsApi.WaitForSync(timeout)
return u
return NewUsersApi(u.PermitBaseFactsApi.WaitForSync(timeout).client, u.config)
}

// List the users from your context's environment.
Expand Down

0 comments on commit 52f9017

Please sign in to comment.