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.go10
1 files changed, 8 insertions, 2 deletions
diff --git a/clientapi/routing/deactivate.go b/clientapi/routing/deactivate.go
index 78cf9fe3..c151c130 100644
--- a/clientapi/routing/deactivate.go
+++ b/clientapi/routing/deactivate.go
@@ -36,7 +36,10 @@ func Deactivate(
localpart, serverName, err := gomatrixserverlib.SplitID('@', login.Username())
if err != nil {
util.GetLogger(req.Context()).WithError(err).Error("gomatrixserverlib.SplitID failed")
- return spec.InternalServerError()
+ return util.JSONResponse{
+ Code: http.StatusInternalServerError,
+ JSON: spec.InternalServerError{},
+ }
}
var res api.PerformAccountDeactivationResponse
@@ -46,7 +49,10 @@ func Deactivate(
}, &res)
if err != nil {
util.GetLogger(ctx).WithError(err).Error("userAPI.PerformAccountDeactivation failed")
- return spec.InternalServerError()
+ return util.JSONResponse{
+ Code: http.StatusInternalServerError,
+ JSON: spec.InternalServerError{},
+ }
}
return util.JSONResponse{