(c *gin.Context)
| 1143 | c.JSON(http.StatusConflict, gin.H{"error": "warehouse still exists — deprovision it and wait for teardown to complete before deleting the org"}) |
| 1144 | return |
| 1145 | } |
| 1146 | c.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()}) |
| 1147 | return |
| 1148 | } |
| 1149 | if !ok { |
| 1150 | c.JSON(http.StatusNotFound, gin.H{"error": "org not found"}) |
| 1151 | return |
| 1152 | } |
| 1153 | c.JSON(http.StatusOK, gin.H{"deleted": name}) |
| 1154 | } |
| 1155 | |
| 1156 | // --- Org teams --- |
| 1157 | |
| 1158 | func (h *apiHandler) listAllOrgTeams(c *gin.Context) { |
| 1159 | teams, err := h.store.ListAllOrgTeams() |
| 1160 | if err != nil { |
| 1161 | c.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()}) |
no test coverage detected