summaryrefslogtreecommitdiff
path: root/internal/api
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2024-11-21 12:13:55 +0100
committerLibravatar GitHub <noreply@github.com>2024-11-21 12:13:55 +0100
commitc2029df9bcfa05c19cf3644f2e686da35e267c68 (patch)
tree0b21c0bca8cc25743b2679ed5f026ed0afafd16f /internal/api
parent[chore] Bump cross-spawn from 7.0.3 to 7.0.6 in /web/source (#3552) (diff)
downloadgotosocial-c2029df9bcfa05c19cf3644f2e686da35e267c68.tar.xz
[feature] Allow emoji shortcode to be 1-character length (#3556)
* [feature] Allow emoji shortcode to be 1-character length * testerino fixeroni * spaghet
Diffstat (limited to 'internal/api')
-rw-r--r--internal/api/client/admin/emojicreate.go2
-rw-r--r--internal/api/client/admin/emojiupdate.go2
-rw-r--r--internal/api/client/admin/emojiupdate_test.go2
3 files changed, 3 insertions, 3 deletions
diff --git a/internal/api/client/admin/emojicreate.go b/internal/api/client/admin/emojicreate.go
index 9696200de..07fa4d4a8 100644
--- a/internal/api/client/admin/emojicreate.go
+++ b/internal/api/client/admin/emojicreate.go
@@ -53,7 +53,7 @@ import (
// 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}
+// pattern: \w{1,30}
// required: true
// -
// name: image
diff --git a/internal/api/client/admin/emojiupdate.go b/internal/api/client/admin/emojiupdate.go
index ec6987024..b8ac101c0 100644
--- a/internal/api/client/admin/emojiupdate.go
+++ b/internal/api/client/admin/emojiupdate.go
@@ -85,7 +85,7 @@ import (
// The code to use for the emoji, which will be used by instance denizens to select it.
// This must be unique on the instance. Works for the `copy` action type only.
// type: string
-// pattern: \w{2,30}
+// pattern: \w{1,30}
// -
// name: image
// in: formData
diff --git a/internal/api/client/admin/emojiupdate_test.go b/internal/api/client/admin/emojiupdate_test.go
index 17eb05fd9..b6dffa887 100644
--- a/internal/api/client/admin/emojiupdate_test.go
+++ b/internal/api/client/admin/emojiupdate_test.go
@@ -560,7 +560,7 @@ func (suite *EmojiUpdateTestSuite) TestEmojiUpdateCopyEmptyShortcode() {
b, err := io.ReadAll(result.Body)
suite.NoError(err)
- suite.Equal(`{"error":"Bad Request: shortcode did not pass validation, must be between 2 and 30 characters, letters, numbers, and underscores only"}`, string(b))
+ suite.Equal(`{"error":"Bad Request: shortcode did not pass validation, must be between 1 and 30 characters, letters, numbers, and underscores only"}`, string(b))
}
func (suite *EmojiUpdateTestSuite) TestEmojiUpdateCopyNoShortcode() {