From 9eeeb4e618032fe32c0258559a1c792da4d06df1 Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Tue, 11 Feb 2020 15:05:45 +0000 Subject: [PATCH] Clean up --- syncapi/query/query.go | 44 ------------------------------------------ 1 file changed, 44 deletions(-) delete mode 100644 syncapi/query/query.go diff --git a/syncapi/query/query.go b/syncapi/query/query.go deleted file mode 100644 index ae3e169b1..000000000 --- a/syncapi/query/query.go +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2020 The Matrix.org Foundation C.I.C. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package query - -import ( - "encoding/json" - "net/http" - - "github.com/matrix-org/dendrite/common" - "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/syncapi/sync" - "github.com/matrix-org/util" -) - -type SyncQueryAPI struct { - requestPool sync.RequestPool -} - -// SetupHTTP adds the RoomserverQueryAPI handlers to the http.ServeMux. -// nolint: gocyclo -func (s *SyncQueryAPI) SetupHTTP(servMux *http.ServeMux) { - servMux.Handle( - api.RoomserverQueryLatestEventsAndStatePath, - common.MakeInternalAPI("querySync", func(req *http.Request) util.JSONResponse { - var request api.QuerySyncRequest - if err := json.NewDecoder(req.Body).Decode(&request); err != nil { - return util.ErrorResponse(err) - } - return s.OnIncomingSyncRequest() - }), - ) -}