From c8d12c38c9b8cb28288a6c5f2123c01cc828d5d6 Mon Sep 17 00:00:00 2001 From: Luna Mendes Date: Sun, 18 Nov 2018 19:29:09 -0300 Subject: [PATCH] blueprints.auth: use REGISTER / REGISTER_WITH_INVITE --- litecord/blueprints/auth.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/litecord/blueprints/auth.py b/litecord/blueprints/auth.py index 3e5676e..3cb6062 100644 --- a/litecord/blueprints/auth.py +++ b/litecord/blueprints/auth.py @@ -36,7 +36,7 @@ async def register(): if not enabled: return 'Registrations disabled', 405 - j = await request.get_json() + j = validate(await request.get_json(), REGISTER) email, password, username = j['email'], j['password'], j['username'] new_id, pwd_hash = await create_user( @@ -51,6 +51,7 @@ async def register(): @bp.route('/register_inv', methods=['POST']) async def _register_with_invite(): data = await request.form + data = validate(await request.form, REGISTER_WITH_INVITE) # dummy for now print(data['username'])