summaryrefslogtreecommitdiff
path: root/internal/api/util/response.go
diff options
context:
space:
mode:
authorLibravatar kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com>2023-12-18 14:18:25 +0000
committerLibravatar GitHub <noreply@github.com>2023-12-18 14:18:25 +0000
commit8ebb7775a35b632d49a8f294d83ac786666631f3 (patch)
tree02ac5475274125170132b0a4d9f69bd67491a32c /internal/api/util/response.go
parentfix poll total vote double count (#2464) (diff)
downloadgotosocial-8ebb7775a35b632d49a8f294d83ac786666631f3.tar.xz
[feature] request blocking by http headers (#2409)
Diffstat (limited to 'internal/api/util/response.go')
-rw-r--r--internal/api/util/response.go9
1 files changed, 6 insertions, 3 deletions
diff --git a/internal/api/util/response.go b/internal/api/util/response.go
index 150d2ac2e..753eaefb8 100644
--- a/internal/api/util/response.go
+++ b/internal/api/util/response.go
@@ -39,14 +39,17 @@ var (
StatusAcceptedJSON = mustJSON(map[string]string{
"status": http.StatusText(http.StatusAccepted),
})
+ StatusForbiddenJSON = mustJSON(map[string]string{
+ "status": http.StatusText(http.StatusForbidden),
+ })
StatusInternalServerErrorJSON = mustJSON(map[string]string{
"status": http.StatusText(http.StatusInternalServerError),
})
ErrorCapacityExceeded = mustJSON(map[string]string{
- "error": "server capacity exceeded!",
+ "error": "server capacity exceeded",
})
- ErrorRateLimitReached = mustJSON(map[string]string{
- "error": "rate limit reached!",
+ ErrorRateLimited = mustJSON(map[string]string{
+ "error": "rate limit reached",
})
EmptyJSONObject = mustJSON("{}")
EmptyJSONArray = mustJSON("[]")