diff options
author | 2024-06-18 18:18:00 +0200 | |
---|---|---|
committer | 2024-06-18 18:18:00 +0200 | |
commit | d2b3d37724a999d4cc78c46157593267e29d184e (patch) | |
tree | ac72be127d8adb80bbd756ad970ae14df7b5618f /internal/api/client/admin/emojiget.go | |
parent | [feature] Implement types[] param for notifications (#3009) (diff) | |
download | gotosocial-d2b3d37724a999d4cc78c46157593267e29d184e.tar.xz |
[feature/frontend] Reports frontend v2 (#3022)
* use apiutil + paging in admin processor+handlers
* we're making it happen
* fix little whoopsie
* styling for report list
* don't youuuu forget about meee don't don't don't don't
* last bits
* sanitize content before showing in report statuses
* update report docs
Diffstat (limited to 'internal/api/client/admin/emojiget.go')
-rw-r--r-- | internal/api/client/admin/emojiget.go | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/internal/api/client/admin/emojiget.go b/internal/api/client/admin/emojiget.go index 730d92db1..7ecbcfa19 100644 --- a/internal/api/client/admin/emojiget.go +++ b/internal/api/client/admin/emojiget.go @@ -18,7 +18,6 @@ package admin import ( - "errors" "fmt" "net/http" @@ -82,10 +81,9 @@ func (m *Module) EmojiGETHandler(c *gin.Context) { return } - emojiID := c.Param(IDKey) - if emojiID == "" { - err := errors.New("no emoji id specified") - apiutil.ErrorHandler(c, gtserror.NewErrorBadRequest(err, err.Error()), m.processor.InstanceGetV1) + emojiID, errWithCode := apiutil.ParseID(c.Param(apiutil.IDKey)) + if errWithCode != nil { + apiutil.ErrorHandler(c, errWithCode, m.processor.InstanceGetV1) return } |