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/emojicreate.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/emojicreate.go')
-rw-r--r-- | internal/api/client/admin/emojicreate.go | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/internal/api/client/admin/emojicreate.go b/internal/api/client/admin/emojicreate.go index 0e60db65f..94e6ecf7a 100644 --- a/internal/api/client/admin/emojicreate.go +++ b/internal/api/client/admin/emojicreate.go @@ -31,6 +31,49 @@ import ( "github.com/superseriousbusiness/gotosocial/internal/util" ) +// emojiCreateRequest handles the creation of a new instance emoji. +// +// swagger:operation POST /api/v1/admin/custom_emojis emojiCreate +// +// Upload and create a new instance emoji. +// +// --- +// tags: +// - admin +// +// consumes: +// - multipart/form-data +// +// produces: +// - application/json +// +// parameters: +// - name: shortcode +// in: formData +// description: |- +// The code to use for the emoji, which will be used by instance denizens to select it. +// This must be unique on the instance. +// type: string +// pattern: \w{2,30} +// example: blobcat_uwu +// - name: domains +// in: formData +// description: A png or gif image of the emoji. Animated pngs work too! +// type: file +// +// security: +// - OAuth2 Bearer: +// - admin +// +// responses: +// '200': +// description: The newly-created emoji. +// schema: +// "$ref": "#/definitions/emoji" +// '403': +// description: forbidden +// '400': +// description: bad request func (m *Module) emojiCreatePOSTHandler(c *gin.Context) { l := m.log.WithFields(logrus.Fields{ "func": "emojiCreatePOSTHandler", |