From dd746892246f22540436a9ddf47b6ec35d0d437a Mon Sep 17 00:00:00 2001 From: Luna Mendes Date: Wed, 10 Oct 2018 18:40:00 -0300 Subject: [PATCH] blueprints.auth: add POST /api/v6/auth/verify/resend --- litecord/blueprints/auth.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/litecord/blueprints/auth.py b/litecord/blueprints/auth.py index c275835..9f0428e 100644 --- a/litecord/blueprints/auth.py +++ b/litecord/blueprints/auth.py @@ -8,6 +8,7 @@ from quart import Blueprint, jsonify, request, current_app as app from litecord.snowflake import get_snowflake from litecord.errors import BadRequest +from litecord.auth import token_check bp = Blueprint('auth', __name__) @@ -94,3 +95,15 @@ async def consent_required(): return jsonify({ 'required': True, }) + + +@bp.route('/verify/resend', methods=['POST']) +async def verify_user(): + user_id = await token_check() + + await app.db.execute(""" + UPDATE users + SET verified = true + """, user_id) + + return '', 204