From caa0cde0e025708a762659758d9de7851745cbfe Mon Sep 17 00:00:00 2001 From: Adelie Paull <1208865+i-am-a-paull@users.noreply.github.com> Date: Fri, 20 May 2022 04:34:36 -0400 Subject: [feature] implement custom_emojis endpoint (#563) * implement custom_emojis api endpoint * add tests for getting custom emoji out of the database and converting to api emoji * change sort direction of emoji query * change logging level and initialize array with known length as per kim's suggestions * add continue to lessen risk of making a malformed struct during conversion from db to api emojis --- internal/processing/media/media.go | 1 + 1 file changed, 1 insertion(+) (limited to 'internal/processing/media/media.go') diff --git a/internal/processing/media/media.go b/internal/processing/media/media.go index 2beac922a..e895e0837 100644 --- a/internal/processing/media/media.go +++ b/internal/processing/media/media.go @@ -39,6 +39,7 @@ type Processor interface { Delete(ctx context.Context, mediaAttachmentID string) gtserror.WithCode // GetFile retrieves a file from storage and streams it back to the caller via an io.reader embedded in *apimodel.Content. GetFile(ctx context.Context, account *gtsmodel.Account, form *apimodel.GetContentRequestForm) (*apimodel.Content, gtserror.WithCode) + GetCustomEmojis(ctx context.Context) ([]*apimodel.Emoji, gtserror.WithCode) GetMedia(ctx context.Context, account *gtsmodel.Account, mediaAttachmentID string) (*apimodel.Attachment, gtserror.WithCode) Update(ctx context.Context, account *gtsmodel.Account, mediaAttachmentID string, form *apimodel.AttachmentUpdateRequest) (*apimodel.Attachment, gtserror.WithCode) } -- cgit v1.2.3