From d7e96f601b59409f41b51948a8c0aa7465d4ede3 Mon Sep 17 00:00:00 2001 From: Remi Reuvekamp Date: Sun, 15 Oct 2017 00:51:23 +0000 Subject: [PATCH] Remove unneeded if statement Which fixes the goconst warning for "POST". Signed-off-by: Remi Reuvekamp --- .../matrix-org/dendrite/clientapi/routing/logout.go | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/github.com/matrix-org/dendrite/clientapi/routing/logout.go b/src/github.com/matrix-org/dendrite/clientapi/routing/logout.go index 163495584..d03e7957f 100644 --- a/src/github.com/matrix-org/dendrite/clientapi/routing/logout.go +++ b/src/github.com/matrix-org/dendrite/clientapi/routing/logout.go @@ -55,13 +55,6 @@ func Logout( func LogoutAll( req *http.Request, deviceDB *devices.Database, device *authtypes.Device, ) util.JSONResponse { - if req.Method != "POST" { - return util.JSONResponse{ - Code: 405, - JSON: jsonerror.NotFound("Bad method"), - } - } - localpart, _, err := gomatrixserverlib.SplitID('@', device.UserID) if err != nil { return httputil.LogThenError(req, err)