Пример #1
0
def sign_out():
    token=request.values.get('token')
    user = database_helper.get_user_by_token(token)
    if(len(user) == 0):
        return jsonify(success = False, message = "You are not signed in")
    else:
        resp=database_helper.logout(token)
        return jsonify(success = True, message = "Successfully logged out")
Пример #2
0
def sign_out():
    token = request.values.get("token")
    type_ = request.values.get("type")
    user = database_helper.get_user_by_token(token)
    print "[sign_out] user: "******"You are not signed in")
    else:
        resp = database_helper.logout(token)

        try:
            if type_ == "normal":
                del curr_connections[user[0][0]]
                print "[sign_out] del:"
            else:
                print "[sign_out] autologout:"
        except:
            print "[sign_out] except:"
        return jsonify(success=True, message="Successfully logged out")
Пример #3
0
def sign_out(token):
     if request.method=='GET':
        mess= database_helper.logout(token=str(token))
        return mess
Пример #4
0
def sign_out(token):
    dh.logout(token)
    return ''
Пример #5
0
def sign_out(token):
    dh.logout(token)
    notify_all_sockets()
    return ''