Working tests, hopefully all code changes done.

This commit is contained in:
Nicholas Staples
2016-01-27 12:22:32 +00:00
parent ce81a6f540
commit 6959d695d3
57 changed files with 1143 additions and 1578 deletions

View File

@@ -3,7 +3,7 @@ from flask import (render_template, url_for, redirect, flash)
from app.main import main
from app.main.dao import users_dao
from app.main.forms import NewPasswordForm
from app.notify_client.sender import check_token, send_sms_code
from app.notify_client.sender import check_token
@main.route('/new-password/<path:token>', methods=['GET', 'POST'])
@@ -22,7 +22,7 @@ def new_password(token):
if form.validate_on_submit():
users_dao.update_password(user, form.new_password.data)
send_sms_code(user.id, user.mobile_number)
users_dao.send_verify_code(user.id, 'sms')
return redirect(url_for('main.two_factor'))
else:
return render_template('views/new-password.html', token=token, form=form, user=user)