From 6447bb2b201c8ef58f4ea0b45358f7a0252e2a2b Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Mon, 8 Jan 2024 23:19:58 -0700 Subject: [PATCH] Fix delete export endpoint location (#539) --- CHANGELOG.md | 1 + api/routes.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 80a02eae..bc685a08 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), * Exports no longer fail with "index out of range \[0] with length 0". * Requests requiring authentication, but lack a provided access token, will return HTTP 401 instead of HTTP 500 now. * Downloads when using a self-hosted MinIO instance are no longer slower than expected. +* The `DELETE /_matrix/media/unstable/admin/export/:exportId` endpoint has been reinstated as described. ## [1.3.3] - October 31, 2023 diff --git a/api/routes.go b/api/routes.go index 808646dd..68495096 100644 --- a/api/routes.go +++ b/api/routes.go @@ -102,7 +102,7 @@ func buildRoutes() http.Handler { register([]string{"GET"}, PrefixMedia, "admin/export/:exportId/view", mxUnstable, router, makeRoute(_routers.OptionalAccessToken(custom.ViewExport), "view_export", counter)) register([]string{"GET"}, PrefixMedia, "admin/export/:exportId/metadata", mxUnstable, router, makeRoute(_routers.OptionalAccessToken(custom.GetExportMetadata), "get_export_metadata", counter)) register([]string{"GET"}, PrefixMedia, "admin/export/:exportId/part/:partId", mxUnstable, router, makeRoute(_routers.OptionalAccessToken(custom.DownloadExportPart), "download_export_part", counter)) - register([]string{"DELETE"}, PrefixMedia, "admin/export/:exportId/delete", mxUnstable, router, makeRoute(_routers.OptionalAccessToken(custom.DeleteExport), "delete_export", counter)) + register([]string{"DELETE"}, PrefixMedia, "admin/export/:exportId", mxUnstable, router, makeRoute(_routers.OptionalAccessToken(custom.DeleteExport), "delete_export", counter)) register([]string{"POST"}, PrefixMedia, "admin/import", mxUnstable, router, makeRoute(_routers.RequireRepoAdmin(custom.StartImport), "start_import", counter)) register([]string{"POST"}, PrefixMedia, "admin/import/:importId/part", mxUnstable, router, makeRoute(_routers.RequireRepoAdmin(custom.AppendToImport), "append_to_import", counter)) register([]string{"POST"}, PrefixMedia, "admin/import/:importId/close", mxUnstable, router, makeRoute(_routers.RequireRepoAdmin(custom.StopImport), "stop_import", counter))