From 6e947ff2662d0b9fc475c5b21e9f1cfb0bb308a0 Mon Sep 17 00:00:00 2001 From: Sashanoraa Date: Sun, 15 May 2022 08:52:46 -0400 Subject: [feature] Media cleanup endpoint (#560) Adds an admin endpoint to trigger a remote media cleanup. Fixed #348 Signed-off-by: Sashanoraa --- internal/api/model/admin.go | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'internal/api/model/admin.go') diff --git a/internal/api/model/admin.go b/internal/api/model/admin.go index ada415546..023ba42b1 100644 --- a/internal/api/model/admin.go +++ b/internal/api/model/admin.go @@ -91,3 +91,12 @@ type AdminAccountActionRequest struct { // ID of the account to be acted on. TargetAccountID string `form:"-" json:"-" xml:"-"` } + +// MediaCleanupRequest models admin media cleanup parameters +// +// swagger:parameters mediaCleanup +type MediaCleanupRequest struct { + // Number of days of remote media to keep. Native values will be treated as 0. + // If value is not specified, the value of media-remote-cache-days in the server config will be used. + RemoteCacheDays *int `form:"remote_cache_days" json:"remote_cache_days" xml:"remote_cache_days"` +} -- cgit v1.2.3