aboutsummaryrefslogtreecommitdiff
path: root/syncapi/routing/relations.go
diff options
context:
space:
mode:
Diffstat (limited to 'syncapi/routing/relations.go')
-rw-r--r--syncapi/routing/relations.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/syncapi/routing/relations.go b/syncapi/routing/relations.go
index 55e4347d..2bf11a56 100644
--- a/syncapi/routing/relations.go
+++ b/syncapi/routing/relations.go
@@ -21,7 +21,6 @@ import (
"github.com/matrix-org/util"
"github.com/sirupsen/logrus"
- "github.com/matrix-org/dendrite/clientapi/jsonerror"
"github.com/matrix-org/dendrite/internal/sqlutil"
"github.com/matrix-org/dendrite/roomserver/api"
rstypes "github.com/matrix-org/dendrite/roomserver/types"
@@ -30,6 +29,7 @@ import (
"github.com/matrix-org/dendrite/syncapi/synctypes"
"github.com/matrix-org/dendrite/syncapi/types"
userapi "github.com/matrix-org/dendrite/userapi/api"
+ "github.com/matrix-org/gomatrixserverlib/spec"
)
type RelationsResponse struct {
@@ -73,14 +73,14 @@ func Relations(
if dir != "b" && dir != "f" {
return util.JSONResponse{
Code: http.StatusBadRequest,
- JSON: jsonerror.MissingArgument("Bad or missing dir query parameter (should be either 'b' or 'f')"),
+ JSON: spec.MissingParam("Bad or missing dir query parameter (should be either 'b' or 'f')"),
}
}
snapshot, err := syncDB.NewDatabaseSnapshot(req.Context())
if err != nil {
logrus.WithError(err).Error("Failed to get snapshot for relations")
- return jsonerror.InternalServerError()
+ return spec.InternalServerError()
}
var succeeded bool
defer sqlutil.EndTransactionWithCheck(snapshot, &succeeded, &err)