[feature] Media cleanup endpoint (#560)

Adds an admin endpoint to trigger a remote media cleanup.

Fixed #348

Signed-off-by: Sashanoraa <sasha@noraa.gay>
This commit is contained in:
Sashanoraa
2022-05-15 08:52:46 -04:00
committed by GitHub
parent 545b16ad35
commit 6e947ff266
8 changed files with 321 additions and 5 deletions

View File

@ -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"`
}