refactor scopes to conform to public id usage and repo error msgs (#117)
This commit is contained in:
8 files changed
+152
-54
No files matched your search
@@ -430,12 +430,12 @@ func (b *Server) CreateDevDatabase(dialect string) error {
|
||||
}
|
||||
}
|
||||
|
||||
scope, err = iam.NewOrganization(iam.WithPublicId(b.DefaultOrgId))
|
||||
scope, err = iam.NewOrganization()
|
||||
if err != nil {
|
||||
c()
|
||||
return fmt.Errorf("error creating new org scope: %w", err)
|
||||
}
|
||||
scope, err = repo.CreateScope(ctx, scope)
|
||||
scope, err = repo.CreateScope(ctx, scope, iam.WithPublicId(b.DefaultOrgId))
|
||||
if err != nil {
|
||||
c()
|
||||
return fmt.Errorf("error persisting new org scope: %w", err)
|
||||
|
||||
Reference in new issue
Block a user