diff options
author | Neil Alexander <neilalexander@users.noreply.github.com> | 2021-04-15 09:58:26 +0100 |
---|---|---|
committer | Neil Alexander <neilalexander@users.noreply.github.com> | 2021-04-15 09:58:26 +0100 |
commit | a9faa1bc4488412f42d4926ab76b35f53cd008cd (patch) | |
tree | 21d0a4c66fa96f44db6e43b1f8e25db93cbc4eca /clientapi/routing | |
parent | 656d11ec9005b5cc47e495229e924df5085065e0 (diff) |
Fix registration error when disabled
Diffstat (limited to 'clientapi/routing')
-rw-r--r-- | clientapi/routing/register.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/clientapi/routing/register.go b/clientapi/routing/register.go index 872bdd73..52641866 100644 --- a/clientapi/routing/register.go +++ b/clientapi/routing/register.go @@ -614,7 +614,10 @@ func handleRegistrationFlow( } if cfg.RegistrationDisabled && r.Auth.Type != authtypes.LoginTypeSharedSecret { - return util.MessageResponse(http.StatusForbidden, "Registration has been disabled") + return util.JSONResponse{ + Code: http.StatusForbidden, + JSON: jsonerror.Forbidden("Registration is disabled"), + } } // Make sure normal user isn't registering under an exclusive application |