diff options
author | 2022-10-14 17:30:04 +0200 | |
---|---|---|
committer | 2022-10-14 17:30:04 +0200 | |
commit | f7416d6e941df6fe016d66bb5b53d633775c1f6f (patch) | |
tree | 086ee8e0de19ce6f2b8ed8e04ecae3848544b48f /internal/processing/admin.go | |
parent | [feature] Add `/api/v1/admin/custom_emojis/{id}` endpoint for single emoji GE... (diff) | |
download | gotosocial-f7416d6e941df6fe016d66bb5b53d633775c1f6f.tar.xz |
[feature] Add emoji DELETE handler at `/api/v1/admin/custom_emojis` (#913)
* add emoji DELETE handler
* no need to process error (thanks kim)
* don't double check if user is admin
* add missing security annotation
Diffstat (limited to 'internal/processing/admin.go')
-rw-r--r-- | internal/processing/admin.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/internal/processing/admin.go b/internal/processing/admin.go index 0ebce4d4e..38ed0905f 100644 --- a/internal/processing/admin.go +++ b/internal/processing/admin.go @@ -42,6 +42,10 @@ func (p *processor) AdminEmojiGet(ctx context.Context, authed *oauth.Auth, id st return p.adminProcessor.EmojiGet(ctx, authed.Account, authed.User, id) } +func (p *processor) AdminEmojiDelete(ctx context.Context, authed *oauth.Auth, id string) (*apimodel.AdminEmoji, gtserror.WithCode) { + return p.adminProcessor.EmojiDelete(ctx, id) +} + func (p *processor) AdminDomainBlockCreate(ctx context.Context, authed *oauth.Auth, form *apimodel.DomainBlockCreateRequest) (*apimodel.DomainBlock, gtserror.WithCode) { return p.adminProcessor.DomainBlockCreate(ctx, authed.Account, form.Domain, form.Obfuscate, form.PublicComment, form.PrivateComment, "") } |