--- Workers ---
(c *gin.Context)
| 1160 | // --- Org teams --- |
| 1161 | |
| 1162 | func (h *apiHandler) listAllOrgTeams(c *gin.Context) { |
| 1163 | teams, err := h.store.ListAllOrgTeams() |
| 1164 | if err != nil { |
| 1165 | c.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()}) |
| 1166 | return |
| 1167 | } |
| 1168 | c.JSON(http.StatusOK, gin.H{"teams": teams}) |
| 1169 | } |
| 1170 | |
| 1171 | // createOrgTeamRequest is the admin create body (POST /teams — the org rides |
| 1172 | // in the body like POST /users, because the /orgs/:id/teams POST route |
| 1173 | // belongs to the provisioning grandfather upsert). schema_name set here is |
| 1174 | // immutable through user-facing flows; operators can later change it via the |
| 1175 | // break-glass PUT, and the internal provisioning grandfather path may |
| 1176 | // overwrite it. |
| 1177 | type createOrgTeamRequest struct { |
no test coverage detected