mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-26 15:33:33 -06:00
[docs] Swagger document /api/v1/custom_emojis (#824)
This commit is contained in:
parent
2b34a9b51c
commit
6a10123790
3 changed files with 54 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue