mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-14 03:57:30 -06:00
[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:
parent
545b16ad35
commit
6e947ff266
8 changed files with 321 additions and 5 deletions
|
|
@ -41,6 +41,7 @@ const (
|
|||
AccountsPathWithID = AccountsPath + "/:" + IDKey
|
||||
// AccountsActionPath is used for taking action on a single account.
|
||||
AccountsActionPath = AccountsPathWithID + "/action"
|
||||
MediaCleanupPath = BasePath + "/media_cleanup"
|
||||
|
||||
// ExportQueryKey is for requesting a public export of some data.
|
||||
ExportQueryKey = "export"
|
||||
|
|
@ -70,5 +71,6 @@ func (m *Module) Route(r router.Router) error {
|
|||
r.AttachHandler(http.MethodGet, DomainBlocksPathWithID, m.DomainBlockGETHandler)
|
||||
r.AttachHandler(http.MethodDelete, DomainBlocksPathWithID, m.DomainBlockDELETEHandler)
|
||||
r.AttachHandler(http.MethodPost, AccountsActionPath, m.AccountActionPOSTHandler)
|
||||
r.AttachHandler(http.MethodPost, MediaCleanupPath, m.MediaCleanupPOSTHandler)
|
||||
return nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue