mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-29 17:52:13 +01:00
2c5b3c72e8
Ensure we return after `ctx.Error(...)`
25 lines
703 B
Go
25 lines
703 B
Go
// Copyright 2020 The Gitea Authors. All rights reserved.
|
|
// Use of this source code is governed by a MIT-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
package misc
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"code.gitea.io/gitea/modules/context"
|
|
"code.gitea.io/gitea/modules/setting"
|
|
)
|
|
|
|
// SettingGetsAllowedReactions return allowed reactions
|
|
func SettingGetsAllowedReactions(ctx *context.APIContext) {
|
|
// swagger:operation GET /settings/allowed_reactions miscellaneous getAllowedReactions
|
|
// ---
|
|
// summary: Returns string array of allowed reactions
|
|
// produces:
|
|
// - application/json
|
|
// responses:
|
|
// "200":
|
|
// "$ref": "#/responses/StringSlice"
|
|
ctx.JSON(http.StatusOK, setting.UI.Reactions)
|
|
}
|