diff options
Diffstat (limited to 'internal/api/client/accounts')
24 files changed, 258 insertions, 0 deletions
diff --git a/internal/api/client/accounts/accountalias.go b/internal/api/client/accounts/accountalias.go index 51183bff7..ef802b5b1 100644 --- a/internal/api/client/accounts/accountalias.go +++ b/internal/api/client/accounts/accountalias.go @@ -64,16 +64,28 @@ import ( // schema: // "$ref": "#/definitions/account" // '400': +// schema: +// "$ref": "#/definitions/error" // description: bad request // '401': +// schema: +// "$ref": "#/definitions/error" // description: unauthorized // '404': +// schema: +// "$ref": "#/definitions/error" // description: not found // '406': +// schema: +// "$ref": "#/definitions/error" // description: not acceptable // '422': +// schema: +// "$ref": "#/definitions/error" // description: Unprocessable. Check the response body for more details. // '500': +// schema: +// "$ref": "#/definitions/error" // description: internal server error func (m *Module) AccountAliasPOSTHandler(c *gin.Context) { authed, errWithCode := apiutil.TokenAuth(c, diff --git a/internal/api/client/accounts/accountcreate.go b/internal/api/client/accounts/accountcreate.go index ef45c7529..d8da4470c 100644 --- a/internal/api/client/accounts/accountcreate.go +++ b/internal/api/client/accounts/accountcreate.go @@ -58,19 +58,31 @@ import ( // schema: // "$ref": "#/definitions/oauthToken" // '400': +// schema: +// "$ref": "#/definitions/error" // description: bad request // '401': +// schema: +// "$ref": "#/definitions/error" // description: unauthorized // '404': +// schema: +// "$ref": "#/definitions/error" // description: not found // '406': +// schema: +// "$ref": "#/definitions/error" // description: not acceptable // '422': +// schema: +// "$ref": "#/definitions/error" // description: >- // Unprocessable. Your account creation request cannot be processed // because either too many accounts have been created on this instance // in the last 24h, or the pending account backlog is full. // '500': +// schema: +// "$ref": "#/definitions/error" // description: internal server error func (m *Module) AccountCreatePOSTHandler(c *gin.Context) { authed, errWithCode := apiutil.TokenAuth(c, diff --git a/internal/api/client/accounts/accountdelete.go b/internal/api/client/accounts/accountdelete.go index e7682b2ce..27f0a428d 100644 --- a/internal/api/client/accounts/accountdelete.go +++ b/internal/api/client/accounts/accountdelete.go @@ -56,14 +56,24 @@ import ( // '202': // description: "The account deletion has been accepted and the account will be deleted." // '400': +// schema: +// "$ref": "#/definitions/error" // description: bad request // '401': +// schema: +// "$ref": "#/definitions/error" // description: unauthorized // '404': +// schema: +// "$ref": "#/definitions/error" // description: not found // '406': +// schema: +// "$ref": "#/definitions/error" // description: not acceptable // '500': +// schema: +// "$ref": "#/definitions/error" // description: internal server error func (m *Module) AccountDeletePOSTHandler(c *gin.Context) { authed, errWithCode := apiutil.TokenAuth(c, diff --git a/internal/api/client/accounts/accountget.go b/internal/api/client/accounts/accountget.go index c28635a86..158748189 100644 --- a/internal/api/client/accounts/accountget.go +++ b/internal/api/client/accounts/accountget.go @@ -55,14 +55,24 @@ import ( // schema: // "$ref": "#/definitions/account" // '400': +// schema: +// "$ref": "#/definitions/error" // description: bad request // '401': +// schema: +// "$ref": "#/definitions/error" // description: unauthorized // '404': +// schema: +// "$ref": "#/definitions/error" // description: not found // '406': +// schema: +// "$ref": "#/definitions/error" // description: not acceptable // '500': +// schema: +// "$ref": "#/definitions/error" // description: internal server error func (m *Module) AccountGETHandler(c *gin.Context) { authed, errWithCode := apiutil.TokenAuth(c, diff --git a/internal/api/client/accounts/accountmove.go b/internal/api/client/accounts/accountmove.go index cdb2cdddb..d95462f07 100644 --- a/internal/api/client/accounts/accountmove.go +++ b/internal/api/client/accounts/accountmove.go @@ -61,16 +61,28 @@ import ( // '202': // description: The account move has been accepted and the account will be moved. // '400': +// schema: +// "$ref": "#/definitions/error" // description: bad request // '401': +// schema: +// "$ref": "#/definitions/error" // description: unauthorized // '404': +// schema: +// "$ref": "#/definitions/error" // description: not found // '406': +// schema: +// "$ref": "#/definitions/error" // description: not acceptable // '422': +// schema: +// "$ref": "#/definitions/error" // description: Unprocessable. Check the response body for more details. // '500': +// schema: +// "$ref": "#/definitions/error" // description: internal server error func (m *Module) AccountMovePOSTHandler(c *gin.Context) { authed, errWithCode := apiutil.TokenAuth(c, diff --git a/internal/api/client/accounts/accountupdate.go b/internal/api/client/accounts/accountupdate.go index 58ba0dd2e..2514b2785 100644 --- a/internal/api/client/accounts/accountupdate.go +++ b/internal/api/client/accounts/accountupdate.go @@ -233,14 +233,24 @@ import ( // schema: // "$ref": "#/definitions/account" // '400': +// schema: +// "$ref": "#/definitions/error" // description: bad request // '401': +// schema: +// "$ref": "#/definitions/error" // description: unauthorized // '404': +// schema: +// "$ref": "#/definitions/error" // description: not found // '406': +// schema: +// "$ref": "#/definitions/error" // description: not acceptable // '500': +// schema: +// "$ref": "#/definitions/error" // description: internal server error func (m *Module) AccountUpdateCredentialsPATCHHandler(c *gin.Context) { authed, errWithCode := apiutil.TokenAuth(c, diff --git a/internal/api/client/accounts/accountverify.go b/internal/api/client/accounts/accountverify.go index dda3c10c6..d3722326f 100644 --- a/internal/api/client/accounts/accountverify.go +++ b/internal/api/client/accounts/accountverify.go @@ -45,14 +45,24 @@ import ( // schema: // "$ref": "#/definitions/account" // '400': +// schema: +// "$ref": "#/definitions/error" // description: bad request // '401': +// schema: +// "$ref": "#/definitions/error" // description: unauthorized // '404': +// schema: +// "$ref": "#/definitions/error" // description: not found // '406': +// schema: +// "$ref": "#/definitions/error" // description: not acceptable // '500': +// schema: +// "$ref": "#/definitions/error" // description: internal server error func (m *Module) AccountVerifyGETHandler(c *gin.Context) { authed, errWithCode := apiutil.TokenAuth(c, diff --git a/internal/api/client/accounts/block.go b/internal/api/client/accounts/block.go index 066ce0c31..3a625c671 100644 --- a/internal/api/client/accounts/block.go +++ b/internal/api/client/accounts/block.go @@ -55,14 +55,24 @@ import ( // schema: // "$ref": "#/definitions/accountRelationship" // '400': +// schema: +// "$ref": "#/definitions/error" // description: bad request // '401': +// schema: +// "$ref": "#/definitions/error" // description: unauthorized // '404': +// schema: +// "$ref": "#/definitions/error" // description: not found // '406': +// schema: +// "$ref": "#/definitions/error" // description: not acceptable // '500': +// schema: +// "$ref": "#/definitions/error" // description: internal server error func (m *Module) AccountBlockPOSTHandler(c *gin.Context) { authed, errWithCode := apiutil.TokenAuth(c, diff --git a/internal/api/client/accounts/featuredtags.go b/internal/api/client/accounts/featuredtags.go index eae3fbdf1..12a91922b 100644 --- a/internal/api/client/accounts/featuredtags.go +++ b/internal/api/client/accounts/featuredtags.go @@ -57,14 +57,24 @@ import ( // items: // type: object // '400': +// schema: +// "$ref": "#/definitions/error" // description: bad request // '401': +// schema: +// "$ref": "#/definitions/error" // description: unauthorized // '404': +// schema: +// "$ref": "#/definitions/error" // description: not found // '406': +// schema: +// "$ref": "#/definitions/error" // description: not acceptable // '500': +// schema: +// "$ref": "#/definitions/error" // description: internal server error func (m *Module) AccountFeaturedTagsGETHandler(c *gin.Context) { _, errWithCode := apiutil.TokenAuth(c, diff --git a/internal/api/client/accounts/follow.go b/internal/api/client/accounts/follow.go index e89cfc40f..886a87c58 100644 --- a/internal/api/client/accounts/follow.go +++ b/internal/api/client/accounts/follow.go @@ -80,14 +80,24 @@ import ( // schema: // "$ref": "#/definitions/accountRelationship" // '400': +// schema: +// "$ref": "#/definitions/error" // description: bad request // '401': +// schema: +// "$ref": "#/definitions/error" // description: unauthorized // '404': +// schema: +// "$ref": "#/definitions/error" // description: not found // '406': +// schema: +// "$ref": "#/definitions/error" // description: not acceptable // '500': +// schema: +// "$ref": "#/definitions/error" // description: internal server error func (m *Module) AccountFollowPOSTHandler(c *gin.Context) { authed, errWithCode := apiutil.TokenAuth(c, diff --git a/internal/api/client/accounts/followers.go b/internal/api/client/accounts/followers.go index a813e9f00..4f9d611ff 100644 --- a/internal/api/client/accounts/followers.go +++ b/internal/api/client/accounts/followers.go @@ -108,14 +108,24 @@ import ( // type: string // description: Links to the next and previous queries. // '400': +// schema: +// "$ref": "#/definitions/error" // description: bad request // '401': +// schema: +// "$ref": "#/definitions/error" // description: unauthorized // '404': +// schema: +// "$ref": "#/definitions/error" // description: not found // '406': +// schema: +// "$ref": "#/definitions/error" // description: not acceptable // '500': +// schema: +// "$ref": "#/definitions/error" // description: internal server error func (m *Module) AccountFollowersGETHandler(c *gin.Context) { authed, errWithCode := apiutil.TokenAuth(c, diff --git a/internal/api/client/accounts/following.go b/internal/api/client/accounts/following.go index 694e95ccd..1cb367224 100644 --- a/internal/api/client/accounts/following.go +++ b/internal/api/client/accounts/following.go @@ -108,14 +108,24 @@ import ( // type: string // description: Links to the next and previous queries. // '400': +// schema: +// "$ref": "#/definitions/error" // description: bad request // '401': +// schema: +// "$ref": "#/definitions/error" // description: unauthorized // '404': +// schema: +// "$ref": "#/definitions/error" // description: not found // '406': +// schema: +// "$ref": "#/definitions/error" // description: not acceptable // '500': +// schema: +// "$ref": "#/definitions/error" // description: internal server error func (m *Module) AccountFollowingGETHandler(c *gin.Context) { authed, errWithCode := apiutil.TokenAuth(c, diff --git a/internal/api/client/accounts/lists.go b/internal/api/client/accounts/lists.go index 23a137533..dc918f0bc 100644 --- a/internal/api/client/accounts/lists.go +++ b/internal/api/client/accounts/lists.go @@ -58,14 +58,24 @@ import ( // items: // "$ref": "#/definitions/list" // '400': +// schema: +// "$ref": "#/definitions/error" // description: bad request // '401': +// schema: +// "$ref": "#/definitions/error" // description: unauthorized // '404': +// schema: +// "$ref": "#/definitions/error" // description: not found // '406': +// schema: +// "$ref": "#/definitions/error" // description: not acceptable // '500': +// schema: +// "$ref": "#/definitions/error" // description: internal server error func (m *Module) AccountListsGETHandler(c *gin.Context) { authed, errWithCode := apiutil.TokenAuth(c, diff --git a/internal/api/client/accounts/lookup.go b/internal/api/client/accounts/lookup.go index 03657a20a..87fcb762f 100644 --- a/internal/api/client/accounts/lookup.go +++ b/internal/api/client/accounts/lookup.go @@ -55,14 +55,24 @@ import ( // schema: // "$ref": "#/definitions/account" // '400': +// schema: +// "$ref": "#/definitions/error" // description: bad request // '401': +// schema: +// "$ref": "#/definitions/error" // description: unauthorized // '404': +// schema: +// "$ref": "#/definitions/error" // description: not found // '406': +// schema: +// "$ref": "#/definitions/error" // description: not acceptable // '500': +// schema: +// "$ref": "#/definitions/error" // description: internal server error func (m *Module) AccountLookupGETHandler(c *gin.Context) { authed, errWithCode := apiutil.TokenAuth(c, diff --git a/internal/api/client/accounts/mute.go b/internal/api/client/accounts/mute.go index e9884eafd..0a3b65a57 100644 --- a/internal/api/client/accounts/mute.go +++ b/internal/api/client/accounts/mute.go @@ -73,16 +73,28 @@ import ( // schema: // "$ref": "#/definitions/accountRelationship" // '400': +// schema: +// "$ref": "#/definitions/error" // description: bad request // '401': +// schema: +// "$ref": "#/definitions/error" // description: unauthorized // '403': +// schema: +// "$ref": "#/definitions/error" // description: forbidden to moved accounts // '404': +// schema: +// "$ref": "#/definitions/error" // description: not found // '406': +// schema: +// "$ref": "#/definitions/error" // description: not acceptable // '500': +// schema: +// "$ref": "#/definitions/error" // description: internal server error func (m *Module) AccountMutePOSTHandler(c *gin.Context) { authed, errWithCode := apiutil.TokenAuth(c, diff --git a/internal/api/client/accounts/note.go b/internal/api/client/accounts/note.go index 2461487e8..f73a39c40 100644 --- a/internal/api/client/accounts/note.go +++ b/internal/api/client/accounts/note.go @@ -64,14 +64,24 @@ import ( // schema: // "$ref": "#/definitions/accountRelationship" // '400': +// schema: +// "$ref": "#/definitions/error" // description: bad request // '401': +// schema: +// "$ref": "#/definitions/error" // description: unauthorized // '404': +// schema: +// "$ref": "#/definitions/error" // description: not found // '406': +// schema: +// "$ref": "#/definitions/error" // description: not acceptable // '500': +// schema: +// "$ref": "#/definitions/error" // description: internal server error func (m *Module) AccountNotePOSTHandler(c *gin.Context) { authed, errWithCode := apiutil.TokenAuth(c, diff --git a/internal/api/client/accounts/profile.go b/internal/api/client/accounts/profile.go index 6f9194ba9..17105d656 100644 --- a/internal/api/client/accounts/profile.go +++ b/internal/api/client/accounts/profile.go @@ -50,14 +50,24 @@ import ( // schema: // "$ref": "#/definitions/account" // '400': +// schema: +// "$ref": "#/definitions/error" // description: bad request // '401': +// schema: +// "$ref": "#/definitions/error" // description: unauthorized // '403': +// schema: +// "$ref": "#/definitions/error" // description: forbidden // '406': +// schema: +// "$ref": "#/definitions/error" // description: not acceptable // '500': +// schema: +// "$ref": "#/definitions/error" // description: internal server error func (m *Module) AccountAvatarDELETEHandler(c *gin.Context) { m.accountDeleteProfileAttachment(c, m.processor.Media().DeleteAvatar) @@ -85,14 +95,24 @@ func (m *Module) AccountAvatarDELETEHandler(c *gin.Context) { // schema: // "$ref": "#/definitions/account" // '400': +// schema: +// "$ref": "#/definitions/error" // description: bad request // '401': +// schema: +// "$ref": "#/definitions/error" // description: unauthorized // '403': +// schema: +// "$ref": "#/definitions/error" // description: forbidden // '406': +// schema: +// "$ref": "#/definitions/error" // description: not acceptable // '500': +// schema: +// "$ref": "#/definitions/error" // description: internal server error func (m *Module) AccountHeaderDELETEHandler(c *gin.Context) { m.accountDeleteProfileAttachment(c, m.processor.Media().DeleteHeader) diff --git a/internal/api/client/accounts/relationships.go b/internal/api/client/accounts/relationships.go index 33a8c20d9..81eda8559 100644 --- a/internal/api/client/accounts/relationships.go +++ b/internal/api/client/accounts/relationships.go @@ -62,14 +62,24 @@ import ( // items: // "$ref": "#/definitions/accountRelationship" // '400': +// schema: +// "$ref": "#/definitions/error" // description: bad request // '401': +// schema: +// "$ref": "#/definitions/error" // description: unauthorized // '404': +// schema: +// "$ref": "#/definitions/error" // description: not found // '406': +// schema: +// "$ref": "#/definitions/error" // description: not acceptable // '500': +// schema: +// "$ref": "#/definitions/error" // description: internal server error func (m *Module) AccountRelationshipsGETHandler(c *gin.Context) { authed, errWithCode := apiutil.TokenAuth(c, diff --git a/internal/api/client/accounts/search.go b/internal/api/client/accounts/search.go index 1c3166c29..4a86374ca 100644 --- a/internal/api/client/accounts/search.go +++ b/internal/api/client/accounts/search.go @@ -96,14 +96,24 @@ import ( // items: // "$ref": "#/definitions/account" // '400': +// schema: +// "$ref": "#/definitions/error" // description: bad request // '401': +// schema: +// "$ref": "#/definitions/error" // description: unauthorized // '404': +// schema: +// "$ref": "#/definitions/error" // description: not found // '406': +// schema: +// "$ref": "#/definitions/error" // description: not acceptable // '500': +// schema: +// "$ref": "#/definitions/error" // description: internal server error func (m *Module) AccountSearchGETHandler(c *gin.Context) { authed, errWithCode := apiutil.TokenAuth(c, diff --git a/internal/api/client/accounts/statuses.go b/internal/api/client/accounts/statuses.go index 9cfb7db85..2d712d554 100644 --- a/internal/api/client/accounts/statuses.go +++ b/internal/api/client/accounts/statuses.go @@ -123,14 +123,24 @@ import ( // type: string // description: Links to the next and previous queries. // '400': +// schema: +// "$ref": "#/definitions/error" // description: bad request // '401': +// schema: +// "$ref": "#/definitions/error" // description: unauthorized // '404': +// schema: +// "$ref": "#/definitions/error" // description: not found // '406': +// schema: +// "$ref": "#/definitions/error" // description: not acceptable // '500': +// schema: +// "$ref": "#/definitions/error" // description: internal server error func (m *Module) AccountStatusesGETHandler(c *gin.Context) { authed, errWithCode := apiutil.TokenAuth(c, diff --git a/internal/api/client/accounts/themesget.go b/internal/api/client/accounts/themesget.go index f1204e85e..06dcf9a7b 100644 --- a/internal/api/client/accounts/themesget.go +++ b/internal/api/client/accounts/themesget.go @@ -49,14 +49,24 @@ import ( // items: // "$ref": "#/definitions/theme" // '400': +// schema: +// "$ref": "#/definitions/error" // description: bad request // '401': +// schema: +// "$ref": "#/definitions/error" // description: unauthorized // '404': +// schema: +// "$ref": "#/definitions/error" // description: not found // '406': +// schema: +// "$ref": "#/definitions/error" // description: not acceptable // '500': +// schema: +// "$ref": "#/definitions/error" // description: internal server error func (m *Module) AccountThemesGETHandler(c *gin.Context) { _, errWithCode := apiutil.TokenAuth(c, diff --git a/internal/api/client/accounts/unblock.go b/internal/api/client/accounts/unblock.go index 0f725967f..9e111f86b 100644 --- a/internal/api/client/accounts/unblock.go +++ b/internal/api/client/accounts/unblock.go @@ -56,14 +56,24 @@ import ( // schema: // "$ref": "#/definitions/accountRelationship" // '400': +// schema: +// "$ref": "#/definitions/error" // description: bad request // '401': +// schema: +// "$ref": "#/definitions/error" // description: unauthorized // '404': +// schema: +// "$ref": "#/definitions/error" // description: not found // '406': +// schema: +// "$ref": "#/definitions/error" // description: not acceptable // '500': +// schema: +// "$ref": "#/definitions/error" // description: internal server error func (m *Module) AccountUnblockPOSTHandler(c *gin.Context) { authed, errWithCode := apiutil.TokenAuth(c, true, true, true, true) diff --git a/internal/api/client/accounts/unfollow.go b/internal/api/client/accounts/unfollow.go index 458232b73..f87f8aa9e 100644 --- a/internal/api/client/accounts/unfollow.go +++ b/internal/api/client/accounts/unfollow.go @@ -56,14 +56,24 @@ import ( // schema: // "$ref": "#/definitions/accountRelationship" // '400': +// schema: +// "$ref": "#/definitions/error" // description: bad request // '401': +// schema: +// "$ref": "#/definitions/error" // description: unauthorized // '404': +// schema: +// "$ref": "#/definitions/error" // description: not found // '406': +// schema: +// "$ref": "#/definitions/error" // description: not acceptable // '500': +// schema: +// "$ref": "#/definitions/error" // description: internal server error func (m *Module) AccountUnfollowPOSTHandler(c *gin.Context) { authed, errWithCode := apiutil.TokenAuth(c, diff --git a/internal/api/client/accounts/unmute.go b/internal/api/client/accounts/unmute.go index eaee047f7..539fcfa11 100644 --- a/internal/api/client/accounts/unmute.go +++ b/internal/api/client/accounts/unmute.go @@ -58,14 +58,24 @@ import ( // schema: // "$ref": "#/definitions/accountRelationship" // '400': +// schema: +// "$ref": "#/definitions/error" // description: bad request // '401': +// schema: +// "$ref": "#/definitions/error" // description: unauthorized // '404': +// schema: +// "$ref": "#/definitions/error" // description: not found // '406': +// schema: +// "$ref": "#/definitions/error" // description: not acceptable // '500': +// schema: +// "$ref": "#/definitions/error" // description: internal server error func (m *Module) AccountUnmutePOSTHandler(c *gin.Context) { authed, errWithCode := apiutil.TokenAuth(c, |
