Beispiel #1
0
def login_user():
    email = request.form['email']
    password = request.form['password']

    if User.login_valid(email, password):
        User.login(email)
    else:
        session['email'] = None
    

    return render_template("profile.html", email = session['email'] )
Beispiel #2
0
def login():
    user = User(request.form['name'], request.form['password'])
    if(user.login(jeopardyDB)):
        resp = make_response(json.dumps({}))
        resp.set_cookie('session', value=user.session)
        return resp
    return jsonify(user.to_dict())