aboutsummaryrefslogtreecommitdiffstats
path: root/routers/api/v1/misc
diff options
context:
space:
mode:
Diffstat (limited to 'routers/api/v1/misc')
-rw-r--r--routers/api/v1/misc/settings.go23
1 files changed, 23 insertions, 0 deletions
diff --git a/routers/api/v1/misc/settings.go b/routers/api/v1/misc/settings.go
new file mode 100644
index 0000000000..11c7eef726
--- /dev/null
+++ b/routers/api/v1/misc/settings.go
@@ -0,0 +1,23 @@
+// 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 (
+ "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(200, setting.UI.Reactions)
+}