errors: use abort for sign up errors
parent
269a2c71fa
commit
c3e86bcbe1
|
@ -151,7 +151,7 @@ def logout(v):
|
||||||
@auth_desired
|
@auth_desired
|
||||||
def sign_up_get(v):
|
def sign_up_get(v):
|
||||||
if not get_setting('Signups'):
|
if not get_setting('Signups'):
|
||||||
return {"error": "New account registration is currently closed. Please come back later."}, 403
|
abort(403, "New account registration is currently closed. Please come back later.")
|
||||||
|
|
||||||
if v: return redirect(SITE_FULL)
|
if v: return redirect(SITE_FULL)
|
||||||
|
|
||||||
|
@ -201,7 +201,7 @@ def sign_up_get(v):
|
||||||
@auth_desired
|
@auth_desired
|
||||||
def sign_up_post(v):
|
def sign_up_post(v):
|
||||||
if not get_setting('Signups'):
|
if not get_setting('Signups'):
|
||||||
return {"error": "New account registration is currently closed. Please come back later."}, 403
|
abort(403, "New account registration is currently closed. Please come back later.")
|
||||||
|
|
||||||
if v: abort(403)
|
if v: abort(403)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue