aboutsummaryrefslogtreecommitdiff
path: root/mediaapi/routing
diff options
context:
space:
mode:
authorKegsay <kegan@matrix.org>2020-05-21 14:40:13 +0100
committerGitHub <noreply@github.com>2020-05-21 14:40:13 +0100
commit24d8df664c21fa8bd68d80b5585a496e264c410a (patch)
tree0a176d6dfd7f81522c5739b53313366b552b0ce1 /mediaapi/routing
parent3fdb045116c9cd2f2a3badfebec0645d0381bacb (diff)
Fix #897 and shuffle directory around (#1054)
* Fix #897 and shuffle directory around * Update find-lint * goimports Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
Diffstat (limited to 'mediaapi/routing')
-rw-r--r--mediaapi/routing/download.go2
-rw-r--r--mediaapi/routing/routing.go10
-rw-r--r--mediaapi/routing/upload.go2
3 files changed, 7 insertions, 7 deletions
diff --git a/mediaapi/routing/download.go b/mediaapi/routing/download.go
index 75df313f..1a025f6f 100644
--- a/mediaapi/routing/download.go
+++ b/mediaapi/routing/download.go
@@ -29,7 +29,7 @@ import (
"sync"
"github.com/matrix-org/dendrite/clientapi/jsonerror"
- "github.com/matrix-org/dendrite/common/config"
+ "github.com/matrix-org/dendrite/internal/config"
"github.com/matrix-org/dendrite/mediaapi/fileutils"
"github.com/matrix-org/dendrite/mediaapi/storage"
"github.com/matrix-org/dendrite/mediaapi/thumbnailer"
diff --git a/mediaapi/routing/routing.go b/mediaapi/routing/routing.go
index 71dad19b..4f765d17 100644
--- a/mediaapi/routing/routing.go
+++ b/mediaapi/routing/routing.go
@@ -22,8 +22,8 @@ import (
"github.com/gorilla/mux"
"github.com/matrix-org/dendrite/clientapi/auth/storage/devices"
- "github.com/matrix-org/dendrite/common"
- "github.com/matrix-org/dendrite/common/config"
+ "github.com/matrix-org/dendrite/internal"
+ "github.com/matrix-org/dendrite/internal/config"
"github.com/matrix-org/dendrite/mediaapi/storage"
"github.com/matrix-org/dendrite/mediaapi/types"
"github.com/matrix-org/gomatrixserverlib"
@@ -59,7 +59,7 @@ func Setup(
}
// TODO: Add AS support
- r0mux.Handle("/upload", common.MakeAuthAPI(
+ r0mux.Handle("/upload", internal.MakeAuthAPI(
"upload", authData,
func(req *http.Request, _ *authtypes.Device) util.JSONResponse {
return Upload(req, cfg, db, activeThumbnailGeneration)
@@ -95,11 +95,11 @@ func makeDownloadAPI(
httpHandler := func(w http.ResponseWriter, req *http.Request) {
req = util.RequestWithLogging(req)
- // Set common headers returned regardless of the outcome of the request
+ // Set internal headers returned regardless of the outcome of the request
util.SetCORSHeaders(w)
// Content-Type will be overridden in case of returning file data, else we respond with JSON-formatted errors
w.Header().Set("Content-Type", "application/json")
- vars, _ := common.URLDecodeMapValues(mux.Vars(req))
+ vars, _ := internal.URLDecodeMapValues(mux.Vars(req))
Download(
w,
req,
diff --git a/mediaapi/routing/upload.go b/mediaapi/routing/upload.go
index 91a45319..022f978d 100644
--- a/mediaapi/routing/upload.go
+++ b/mediaapi/routing/upload.go
@@ -24,7 +24,7 @@ import (
"strings"
"github.com/matrix-org/dendrite/clientapi/jsonerror"
- "github.com/matrix-org/dendrite/common/config"
+ "github.com/matrix-org/dendrite/internal/config"
"github.com/matrix-org/dendrite/mediaapi/fileutils"
"github.com/matrix-org/dendrite/mediaapi/storage"
"github.com/matrix-org/dendrite/mediaapi/thumbnailer"