summaryrefslogtreecommitdiff
path: root/internal/processing/admin.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2022-12-10 22:43:11 +0100
committerLibravatar GitHub <noreply@github.com>2022-12-10 21:43:11 +0000
commit5e060d0bcb9af77e7b6d11acba99db6219d4f68e (patch)
tree8dee821f5577ed38be754d73370ed2b74c8f0d2b /internal/processing/admin.go
parent[chore] make single pull request template (#1239) (diff)
downloadgotosocial-5e060d0bcb9af77e7b6d11acba99db6219d4f68e.tar.xz
[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 <grufwub@gmail.com> Co-authored-by: kim <grufwub@gmail.com>
Diffstat (limited to 'internal/processing/admin.go')
-rw-r--r--internal/processing/admin.go4
1 files changed, 4 insertions, 0 deletions
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)
+}