aboutsummaryrefslogtreecommitdiff
path: root/clientapi/routing/deactivate.go
diff options
context:
space:
mode:
Diffstat (limited to 'clientapi/routing/deactivate.go')
-rw-r--r--clientapi/routing/deactivate.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/clientapi/routing/deactivate.go b/clientapi/routing/deactivate.go
index 3f4f539f..78cf9fe3 100644
--- a/clientapi/routing/deactivate.go
+++ b/clientapi/routing/deactivate.go
@@ -5,9 +5,9 @@ import (
"net/http"
"github.com/matrix-org/dendrite/clientapi/auth"
- "github.com/matrix-org/dendrite/clientapi/jsonerror"
"github.com/matrix-org/dendrite/userapi/api"
"github.com/matrix-org/gomatrixserverlib"
+ "github.com/matrix-org/gomatrixserverlib/spec"
"github.com/matrix-org/util"
)
@@ -24,7 +24,7 @@ func Deactivate(
if err != nil {
return util.JSONResponse{
Code: http.StatusBadRequest,
- JSON: jsonerror.BadJSON("The request body could not be read: " + err.Error()),
+ JSON: spec.BadJSON("The request body could not be read: " + err.Error()),
}
}
@@ -36,7 +36,7 @@ func Deactivate(
localpart, serverName, err := gomatrixserverlib.SplitID('@', login.Username())
if err != nil {
util.GetLogger(req.Context()).WithError(err).Error("gomatrixserverlib.SplitID failed")
- return jsonerror.InternalServerError()
+ return spec.InternalServerError()
}
var res api.PerformAccountDeactivationResponse
@@ -46,7 +46,7 @@ func Deactivate(
}, &res)
if err != nil {
util.GetLogger(ctx).WithError(err).Error("userAPI.PerformAccountDeactivation failed")
- return jsonerror.InternalServerError()
+ return spec.InternalServerError()
}
return util.JSONResponse{