summaryrefslogtreecommitdiff
path: root/internal/api/client/admin/admin.go
diff options
context:
space:
mode:
authorLibravatar Sashanoraa <sasha@noraa.gay>2022-05-15 08:52:46 -0400
committerLibravatar GitHub <noreply@github.com>2022-05-15 14:52:46 +0200
commit6e947ff2662d0b9fc475c5b21e9f1cfb0bb308a0 (patch)
tree9138d4e7a988e883b7734431034c055776f255f6 /internal/api/client/admin/admin.go
parent[documentation] Nlnet application (#572) (diff)
downloadgotosocial-6e947ff2662d0b9fc475c5b21e9f1cfb0bb308a0.tar.xz
[feature] Media cleanup endpoint (#560)
Adds an admin endpoint to trigger a remote media cleanup. Fixed #348 Signed-off-by: Sashanoraa <sasha@noraa.gay>
Diffstat (limited to 'internal/api/client/admin/admin.go')
-rw-r--r--internal/api/client/admin/admin.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/internal/api/client/admin/admin.go b/internal/api/client/admin/admin.go
index 7cf2c9bfc..2044c4ab0 100644
--- a/internal/api/client/admin/admin.go
+++ b/internal/api/client/admin/admin.go
@@ -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
}