def login_action(): email = request.form['email'] password = request.form['password'] print(email, password) data = {} result = mongo.Login(email, password) if result['check']: session['email'] = email session['name'] = result['name'] data['check'] = True data['link'] = "/dashboard" return data
def login_action(): email = request.form['email'] password = request.form['password'] print(email, password) data = mongo.Login(email, password) link_map = {"Investor": '/capital', "Enterprise": "/company"} if data['check']: data['link'] = link_map[data['category']] session['name'] = data['name'] session['category'] = data['category'] session['hash'] = data['hash'] return data return data
def login_action(): email = request.form['email'] password = request.form['password'] print(email, password) data = mongo.Login(email, password) link_map = {'SME': '/sme', 'CE': '/ce', "Capitalist": '/capital'} if data['check']: data['link'] = link_map[data['category']] session['name'] = data['name'] session['category'] = data['category'] session['hash'] = data['hash'] return data return data
def login_action(): email = request.form['email'] password = request.form['password'] check, role = mongo.Login(email, password) if check: print("User exists") session['email'] = email if role == "Teacher": session['game'] = "True" print("game editing") print("session started") print(role) return "Success" else: print("User Does not exists") return {"error": "User does not exists"}
def LoginAction(): email = request.form['email'] password = request.form['password'] response = {} result = mongo.Login(email,password) if result['check']: session['email'] = email session['name'] = result['name'] session['category'] = result['category'] response['check'] = True if result['category'] == "CloudProvider": response['link'] = '/CloudProvider' else: response['link'] = '/dashboard' return response