--- Sessions ---
(c *gin.Context)
| 1176 | // overwrite it. |
| 1177 | type createOrgTeamRequest struct { |
| 1178 | OrgID string `json:"org_id"` |
| 1179 | TeamID int64 `json:"team_id"` |
| 1180 | SchemaName string `json:"schema_name"` |
| 1181 | Enabled *bool `json:"enabled,omitempty"` |
| 1182 | BackfillEnabled *bool `json:"backfill_enabled,omitempty"` |
| 1183 | } |
| 1184 | |
| 1185 | func (h *apiHandler) createOrgTeam(c *gin.Context) { |
| 1186 | var req createOrgTeamRequest |
| 1187 | if err := c.ShouldBindJSON(&req); err != nil { |
| 1188 | c.JSON(http.StatusBadRequest, gin.H{"error": err.Error()}) |
| 1189 | return |
| 1190 | } |
| 1191 | orgID := req.OrgID |
| 1192 | if orgID == "" { |
| 1193 | c.JSON(http.StatusBadRequest, gin.H{"error": "org_id is required"}) |
no test coverage detected