diff options
author | 2022-09-13 13:30:07 +0200 | |
---|---|---|
committer | 2022-09-13 13:30:07 +0200 | |
commit | 6a101237902dd9fd7205967dc9e5a95ce8d1b765 (patch) | |
tree | 89a55d9f6512afba74fad7e5819aa3695597e7a0 /internal/api | |
parent | [bug] fix unique constraint conflict (#820) (diff) | |
download | gotosocial-6a101237902dd9fd7205967dc9e5a95ce8d1b765.tar.xz |
[docs] Swagger document `/api/v1/custom_emojis` (#824)
Diffstat (limited to 'internal/api')
-rw-r--r-- | internal/api/client/emoji/emojisget.go | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/internal/api/client/emoji/emojisget.go b/internal/api/client/emoji/emojisget.go index 488aad78b..c5a2ced63 100644 --- a/internal/api/client/emoji/emojisget.go +++ b/internal/api/client/emoji/emojisget.go @@ -9,7 +9,34 @@ import ( "github.com/superseriousbusiness/gotosocial/internal/oauth" ) -// EmojisGETHandler returns a list of custom emojis enabled on the instance +// EmojisGETHandler swagger:operation GET /api/v1/custom_emojis customEmojisGet +// +// Get an array of custom emojis available on the instance. +// +// --- +// tags: +// - custom_emojis +// +// produces: +// - application/json +// +// security: +// - OAuth2 Bearer: +// - read:custom_emojis +// +// responses: +// '200': +// description: Array of custom emojis. +// schema: +// type: array +// items: +// "$ref": "#/definitions/emoji" +// '401': +// description: unauthorized +// '406': +// description: not acceptable +// '500': +// description: internal server error func (m *Module) EmojisGETHandler(c *gin.Context) { if _, err := oauth.Authed(c, true, true, true, true); err != nil { api.ErrorHandler(c, gtserror.NewErrorUnauthorized(err, err.Error()), m.processor.InstanceGet) |