diff options
Diffstat (limited to 'routers/api/v1/org/org.go')
-rw-r--r-- | routers/api/v1/org/org.go | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/routers/api/v1/org/org.go b/routers/api/v1/org/org.go index 217b38683e..59351e20d1 100644 --- a/routers/api/v1/org/org.go +++ b/routers/api/v1/org/org.go @@ -166,3 +166,26 @@ func Edit(ctx *context.APIContext, form api.EditOrgOption) { ctx.JSON(200, convert.ToOrganization(org)) } + +//Delete an organization +func Delete(ctx *context.APIContext) { + // swagger:operation DELETE /orgs/{org} organization orgDelete + // --- + // summary: Delete an organization + // produces: + // - application/json + // parameters: + // - name: org + // in: path + // description: organization that is to be deleted + // type: string + // required: true + // responses: + // "204": + // "$ref": "#/responses/empty" + if err := models.DeleteOrganization(ctx.Org.Organization); err != nil { + ctx.Error(500, "DeleteOrganization", err) + return + } + ctx.Status(204) +} |