From 5e060d0bcb9af77e7b6d11acba99db6219d4f68e Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Sat, 10 Dec 2022 22:43:11 +0100 Subject: [feature] Start implementing refetch of lost media files via `/api/v1/admin/media_refetch` (#1221) * [chore] Move ShortcodeDomain to its own little util func * [feature] Add RefetchEmojis function to media manager * [feature] Expose admin media refresh via admin API * update following review feedback - change/fix log levels - make sure not to try to refetch local emojis - small style refactoring + comments * log on emoji refetch start Signed-off-by: kim Co-authored-by: kim --- internal/processing/admin.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'internal/processing/admin.go') diff --git a/internal/processing/admin.go b/internal/processing/admin.go index 7b0933c0e..6654c9770 100644 --- a/internal/processing/admin.go +++ b/internal/processing/admin.go @@ -77,3 +77,7 @@ func (p *processor) AdminDomainBlockDelete(ctx context.Context, authed *oauth.Au func (p *processor) AdminMediaPrune(ctx context.Context, mediaRemoteCacheDays int) gtserror.WithCode { return p.adminProcessor.MediaPrune(ctx, mediaRemoteCacheDays) } + +func (p *processor) AdminMediaRefetch(ctx context.Context, authed *oauth.Auth, domain string) gtserror.WithCode { + return p.adminProcessor.MediaRefetch(ctx, authed.Account, domain) +} -- cgit v1.2.3