This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# codigo refactorizado aplicando el principio de responsabilidad única (SRP) | |
@bp.route('/register', methods=['GET', 'POST']) | |
def register(): | |
if current_user.is_authenticated: | |
return redirect(url_for('dashboard.dashboard')) | |
if request.method == 'POST': | |
form_data = _get_form_data() | |
error = _validate_user_data(form_data) |