def send_new_password(): user = UserController() user_id = request.form['user_id'] password = request.form['password'] result = user.new_password(user_id, password) if result: return render_template('login.html', data={'status': 200, 'msg': 'Senha alterada com sucesso!', 'type': 3, 'user_id': user_id}) else: return render_template('new_password.html', data={'status': 401, 'msg': 'Erro ao alterar senha.', 'type': 1, 'user_id': user_id})
def send_new_password(): user = UserController() user_id = request.form["user_id"] password = request.form["password"] result = user.new_password(user_id, password) if result: return render_template("login.html", data={ "status": 200, "msg": "Senha alterada com sucesso", "type": 3, "user_id": user_id }) else: return render_template("new_password.html", data={ "status": 401, "msg": "Erro ao alterar senha", "type": 1, "user_id": user_id })