more swagger docs + other changes (#125)

* more swagger docs + other changes

* go fmt
This commit is contained in:
Tobi Smethurst
2021-07-31 23:17:39 +02:00
committed by GitHub
parent 65bf285637
commit 6bd26ff4c4
15 changed files with 465 additions and 24 deletions

View File

@@ -9,6 +9,40 @@ import (
)
// DomainBlockDELETEHandler deals with the delete of an existing domain block.
//
// swagger:operation DELETE /api/v1/admin/domain_blocks/{id} domainBlockDelete
//
// Delete domain block with the given ID.
//
// ---
// tags:
// - admin
//
// produces:
// - application/json
//
// parameters:
// - name: id
// type: string
// description: The id of the domain block.
// in: path
// required: true
//
// security:
// - OAuth2 Bearer:
// - admin
//
// responses:
// '200':
// description: The domain block that was just deleted.
// schema:
// "$ref": "#/definitions/domainBlock"
// '403':
// description: forbidden
// '400':
// description: bad request
// '404':
// description: not found
func (m *Module) DomainBlockDELETEHandler(c *gin.Context) {
l := m.log.WithFields(logrus.Fields{
"func": "DomainBlockDELETEHandler",