Remove unneeded if statement

Which fixes the goconst warning for "POST".

Signed-off-by: Remi Reuvekamp <git@remireuvekamp.nl>
This commit is contained in:
Remi Reuvekamp 2017-10-15 00:51:23 +00:00
parent 5c48d7316e
commit d7e96f601b

View file

@ -55,13 +55,6 @@ func Logout(
func LogoutAll( func LogoutAll(
req *http.Request, deviceDB *devices.Database, device *authtypes.Device, req *http.Request, deviceDB *devices.Database, device *authtypes.Device,
) util.JSONResponse { ) util.JSONResponse {
if req.Method != "POST" {
return util.JSONResponse{
Code: 405,
JSON: jsonerror.NotFound("Bad method"),
}
}
localpart, _, err := gomatrixserverlib.SplitID('@', device.UserID) localpart, _, err := gomatrixserverlib.SplitID('@', device.UserID)
if err != nil { if err != nil {
return httputil.LogThenError(req, err) return httputil.LogThenError(req, err)