MCPcopy Create free account
hub / github.com/PostHog/duckgres / listOrgs

Method listOrgs

controlplane/admin/api.go:509–516  ·  view source on GitHub ↗

--- Orgs ---

(c *gin.Context)

Source from the content-addressed store, hash-verified

507 return err
508 }
509 prev = team
510
511 fields := map[string]interface{}{"updated_at": gorm.Expr("now()")}
512 if upd.SchemaName != nil && *upd.SchemaName != team.SchemaName {
513 // Pre-check the per-org schema uniqueness for a clean error; the
514 // unique (org_id, schema_name) index still backs it — a concurrent
515 // writer that slips past the check fails with a 23505 (same
516 // contract as configstore.UpsertOrgTeamTx).
517 var clash int64
518 if err := tx.Model(&configstore.OrgTeam{}).
519 Where("org_id = ? AND schema_name = ? AND team_id <> ?", orgID, *upd.SchemaName, teamID).

Callers 1

useOrgsFunction · 0.80

Calls 2

ListOrgsMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected