diff options
author | 2021-07-31 23:17:39 +0200 | |
---|---|---|
committer | 2021-07-31 23:17:39 +0200 | |
commit | 6bd26ff4c4d655e26adcf43d9331e9a3efe1329a (patch) | |
tree | 12785e672d8c4815ce54599c747fe2f3927a0c6a /internal/api/client/admin/domainblocksget.go | |
parent | requirements.txt for RtD (diff) | |
download | gotosocial-6bd26ff4c4d655e26adcf43d9331e9a3efe1329a.tar.xz |
more swagger docs + other changes (#125)
* more swagger docs + other changes
* go fmt
Diffstat (limited to 'internal/api/client/admin/domainblocksget.go')
-rw-r--r-- | internal/api/client/admin/domainblocksget.go | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/internal/api/client/admin/domainblocksget.go b/internal/api/client/admin/domainblocksget.go index 1e873a302..70f1f5d08 100644 --- a/internal/api/client/admin/domainblocksget.go +++ b/internal/api/client/admin/domainblocksget.go @@ -10,6 +10,46 @@ import ( ) // DomainBlocksGETHandler returns a list of all existing domain blocks. +// +// swagger:operation GET /api/v1/admin/domain_blocks domainBlocksGet +// +// View all domain blocks currently in place. +// +// --- +// tags: +// - admin +// +// produces: +// - application/json +// +// parameters: +// - name: export +// type: boolean +// description: |- +// If set to true, then each entry in the returned list of domain blocks will only consist of +// the fields 'domain' and 'public_comment'. This is perfect for when you want to save and share +// a list of all the domains you have blocked on your instance, so that someone else can easily import them, +// but you don't need them to see the database IDs of your blocks, or private comments etc. +// in: query +// required: false +// +// security: +// - OAuth2 Bearer: +// - admin +// +// responses: +// '200': +// description: All domain blocks currently in place. +// schema: +// type: array +// items: +// "$ref": "#/definitions/domainBlock" +// '403': +// description: forbidden +// '400': +// description: bad request +// '404': +// description: not found func (m *Module) DomainBlocksGETHandler(c *gin.Context) { l := m.log.WithFields(logrus.Fields{ "func": "DomainBlocksGETHandler", |