Exemplo n.º 1
0
def log():
    # print "form sent", request.form["log"]
    data = request.form["time"]

    current_user.log(data)
    # print current_user.in_out
    return redirect(url_for("main"))
Exemplo n.º 2
0
def api_log():

    if not current_user.is_anonymous():
        data = json.loads(request.data)

        current_user.log(data['time'])
        return Response(response=json.dumps(current_user.is_checked_in()),
                        status=200,
                        headers=None,
                        content_type='application/json',
                        direct_passthrough=False)