Move federationapi.readers package into routing (#314)

This seems to have been missed when we folded all the readers and
writers packages into routing.
This commit is contained in:
Erik Johnston 2017-10-25 11:27:44 +01:00 committed by Richard van der Hoff
parent ce562d96f6
commit 3790a8da40
4 changed files with 6 additions and 7 deletions

View File

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package readers
package routing
import (
"context"

View File

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package readers
package routing
import (
"encoding/json"

View File

@ -23,7 +23,6 @@ import (
"github.com/matrix-org/dendrite/clientapi/producers"
"github.com/matrix-org/dendrite/common"
"github.com/matrix-org/dendrite/common/config"
"github.com/matrix-org/dendrite/federationapi/readers"
"github.com/matrix-org/dendrite/roomserver/api"
"github.com/matrix-org/gomatrixserverlib"
"github.com/matrix-org/util"
@ -48,7 +47,7 @@ func Setup(
v1fedmux := apiMux.PathPrefix(pathPrefixV1Federation).Subrouter()
localKeys := common.MakeExternalAPI("localkeys", func(req *http.Request) util.JSONResponse {
return readers.LocalKeys(cfg)
return LocalKeys(cfg)
})
// Ignore the {keyID} argument as we only have a single server key so we always
@ -100,7 +99,7 @@ func Setup(
"federation_get_event", cfg.Matrix.ServerName, keys,
func(httpReq *http.Request, request *gomatrixserverlib.FederationRequest) util.JSONResponse {
vars := mux.Vars(httpReq)
return readers.GetEvent(
return GetEvent(
httpReq.Context(), request, cfg, query, time.Now(), keys, vars["eventID"],
)
},
@ -109,7 +108,7 @@ func Setup(
v1fedmux.Handle("/version", common.MakeExternalAPI(
"federation_version",
func(httpReq *http.Request) util.JSONResponse {
return readers.Version()
return Version()
},
)).Methods("GET")
}

View File

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package readers
package routing
import (
"github.com/matrix-org/util"