Extract login utils out of two_factor view

This better reflects how the code is reused in other views and is
not specific to two factor actions. We have a pattern of testing
utility functionality for each view (as opposed to testing the util
+ the view calls the util), so I'm leaving the tests as-is.
This commit is contained in:
Ben Thorner
2021-06-14 11:19:06 +01:00
parent 3250f2b3ed
commit bf2e6802bf
4 changed files with 45 additions and 40 deletions
+1 -1
View File
@@ -14,8 +14,8 @@ from notifications_utils.url_safe_token import check_token
from app.main import main
from app.main.forms import NewPasswordForm
from app.main.views.two_factor import log_in_user
from app.models.user import User
from app.utils.login import log_in_user
@main.route('/new-password/<path:token>', methods=['GET', 'POST'])