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/processor.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/processor.go')
-rw-r--r-- | internal/processing/processor.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/internal/processing/processor.go b/internal/processing/processor.go index ff465c926..b7ab8504c 100644 --- a/internal/processing/processor.go +++ b/internal/processing/processor.go @@ -116,6 +116,9 @@ type Processor interface { AdminEmojisGet(ctx context.Context, authed *oauth.Auth, domain string, includeDisabled bool, includeEnabled bool, shortcode string, maxShortcodeDomain string, minShortcodeDomain string, limit int) (*apimodel.PageableResponse, gtserror.WithCode) // AdminEmojiGet returns the admin view of an emoji with the given ID AdminEmojiGet(ctx context.Context, authed *oauth.Auth, id string) (*apimodel.AdminEmoji, gtserror.WithCode) + // AdminEmojiDelete deletes one *local* emoji with the given key. Remote emojis will not be deleted this way. + // Only admin users in good standing should be allowed to access this function -- check this before calling it. + AdminEmojiDelete(ctx context.Context, authed *oauth.Auth, id string) (*apimodel.AdminEmoji, gtserror.WithCode) // AdminDomainBlockCreate handles the creation of a new domain block by an admin, using the given form. AdminDomainBlockCreate(ctx context.Context, authed *oauth.Auth, form *apimodel.DomainBlockCreateRequest) (*apimodel.DomainBlock, gtserror.WithCode) // AdminDomainBlocksImport handles the import of multiple domain blocks by an admin, using the given form. |