diff options
author | 2022-11-24 19:12:07 +0100 | |
---|---|---|
committer | 2022-11-24 18:12:07 +0000 | |
commit | b6dbe21026615ef3fbaacff98c7cc860cef39d16 (patch) | |
tree | cef207c759ba936c9432c456e751c862e2c0830c /internal/processing/processor.go | |
parent | [bugfix] Fix status boosts giving 404 (#1137) (diff) | |
download | gotosocial-b6dbe21026615ef3fbaacff98c7cc860cef39d16.tar.xz |
[feature] `PATCH /api/v1/admin/custom_emojis/{id}` endpoint (#1061)
* start adding admin emoji PATCH stuff
* updating works OK, now how about copying
* allow emojis to be copied
* update swagger docs
* update admin processer to use non-interface storage driver
* remove shortcode updating for local emojis
* go fmt
Co-authored-by: f0x52 <f0x@cthu.lu>
Diffstat (limited to 'internal/processing/processor.go')
-rw-r--r-- | internal/processing/processor.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/internal/processing/processor.go b/internal/processing/processor.go index 686cb5015..22fb7b2b7 100644 --- a/internal/processing/processor.go +++ b/internal/processing/processor.go @@ -119,6 +119,9 @@ type Processor interface { // 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) + // AdminEmojiUpdate updates one local or remote emoji with the given key. + // Only admin users in good standing should be allowed to access this function -- check this before calling it. + AdminEmojiUpdate(ctx context.Context, id string, form *apimodel.EmojiUpdateRequest) (*apimodel.AdminEmoji, gtserror.WithCode) // AdminEmojiCategoriesGet gets a list of all existing emoji categories. AdminEmojiCategoriesGet(ctx context.Context) ([]*apimodel.EmojiCategory, gtserror.WithCode) // AdminDomainBlockCreate handles the creation of a new domain block by an admin, using the given form. @@ -308,7 +311,7 @@ func NewProcessor( statusProcessor := status.New(db, tc, clientWorker, parseMentionFunc) streamingProcessor := streaming.New(db, oauthServer) accountProcessor := account.New(db, tc, mediaManager, oauthServer, clientWorker, federator, parseMentionFunc) - adminProcessor := admin.New(db, tc, mediaManager, clientWorker) + adminProcessor := admin.New(db, tc, mediaManager, storage, clientWorker) mediaProcessor := mediaProcessor.New(db, tc, mediaManager, federator.TransportController(), storage) userProcessor := user.New(db, emailSender) federationProcessor := federationProcessor.New(db, tc, federator) |