From 65e36484d6140682cbeb2df77d27ca3c9890e9f9 Mon Sep 17 00:00:00 2001 From: "Crom (Thibaut CHARLES)" Date: Fri, 12 Jan 2018 18:42:14 +0100 Subject: [PATCH] Fix GET filter sending a base64 encoded json Signed-off-by: Thibaut CHARLES cromfr@gmail.com --- .../matrix-org/dendrite/clientapi/routing/filter.go | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/github.com/matrix-org/dendrite/clientapi/routing/filter.go b/src/github.com/matrix-org/dendrite/clientapi/routing/filter.go index d14aaeb96..5ca6bf972 100644 --- a/src/github.com/matrix-org/dendrite/clientapi/routing/filter.go +++ b/src/github.com/matrix-org/dendrite/clientapi/routing/filter.go @@ -17,8 +17,6 @@ package routing import ( "net/http" - "encoding/json" - "github.com/matrix-org/dendrite/clientapi/auth/authtypes" "github.com/matrix-org/dendrite/clientapi/auth/storage/accounts" "github.com/matrix-org/dendrite/clientapi/httputil" @@ -60,14 +58,9 @@ func GetFilter( } } - filterJSON, err := json.Marshal(filter) - if err != nil { - return httputil.LogThenError(req, err) - } - return util.JSONResponse{ Code: 200, - JSON: filterJSON, + JSON: filter, } }