Skip to content

Commit

Permalink
Fix seed script
Browse files Browse the repository at this point in the history
  • Loading branch information
jakubno committed Jan 16, 2025
1 parent d71774d commit abef79a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/shared/scripts/seed-db.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,16 @@ func main() {
}

// Create team
t, err := database.Client.Team.Create().SetEmail(email).SetName("E2B").SetID(teamUUID).SetTier("base_v1").AddUsers(user).Save(ctx)
t, err := database.Client.Team.Create().SetEmail(email).SetName("E2B").SetID(teamUUID).SetTier("base_v1").Save(ctx)
if err != nil {
panic(err)
}

// Create user team
_, err = database.Client.UsersTeams.Create().SetUserID(user.ID).SetTeamID(t.ID).SetIsDefault(true).Save(ctx)
if err != nil {
panic(err)
}
// Create access token
_, err = database.Client.AccessToken.Create().SetUser(user).SetID(accessToken).Save(ctx)
if err != nil {
Expand Down

0 comments on commit abef79a

Please sign in to comment.