summaryrefslogtreecommitdiff
path: root/internal/api/client/account/followers.go
diff options
context:
space:
mode:
authorLibravatar Tobi Smethurst <31960611+tsmethurst@users.noreply.github.com>2021-07-31 17:49:59 +0200
committerLibravatar GitHub <noreply@github.com>2021-07-31 17:49:59 +0200
commit58dddd86e0ddbb0c6aa54506dcef162321babfbb (patch)
treeee83cec11f05dfe1e397b9303fe5cd7c2273d4f3 /internal/api/client/account/followers.go
parentPassword change (#123) (diff)
downloadgotosocial-58dddd86e0ddbb0c6aa54506dcef162321babfbb.tar.xz
Swagger (#124)
* start experimenting with swagger documentation * further adventures in swagger * do a few more api paths * account paths documented * go fmt * fix up some models * bit o lintin'
Diffstat (limited to 'internal/api/client/account/followers.go')
-rw-r--r--internal/api/client/account/followers.go37
1 files changed, 37 insertions, 0 deletions
diff --git a/internal/api/client/account/followers.go b/internal/api/client/account/followers.go
index 3401df24c..85bb65978 100644
--- a/internal/api/client/account/followers.go
+++ b/internal/api/client/account/followers.go
@@ -26,6 +26,43 @@ import (
)
// AccountFollowersGETHandler serves the followers of the requested account, if they're visible to the requester.
+//
+// swagger:operation GET /api/v1/accounts/{id}/followers accountFollowers
+//
+// See followers of account with given id.
+//
+// ---
+// tags:
+// - accounts
+//
+// produces:
+// - application/json
+//
+// parameters:
+// - name: id
+// type: string
+// description: Account ID.
+// in: path
+// required: true
+//
+// security:
+// - OAuth2 Bearer:
+// - read:accounts
+//
+// responses:
+// '200':
+// name: accounts
+// description: Array of accounts that follow this account.
+// schema:
+// type: array
+// items:
+// "$ref": "#/definitions/account"
+// '401':
+// description: unauthorized
+// '400':
+// description: bad request
+// '404':
+// description: not found
func (m *Module) AccountFollowersGETHandler(c *gin.Context) {
authed, err := oauth.Authed(c, true, true, true, true)
if err != nil {