Esempio n. 1
0
def mark_thread_read(thread_id):
    try:
        if str(thread_id) not in g.user.get_threads():
            abort(401)
    except AttributeError:
        abort(401)

    t = Thread(redis=g.r, user=g.user)
    t.load(thread_id)
    t.reset_unread_count()
    abort(200)
Esempio n. 2
0
def mark_thread_read(thread_id):
    try:
        if str(thread_id) not in g.user.get_threads():
            abort(401)
    except AttributeError:
        abort(401)

    t = Thread(redis=g.r, user=g.user)
    t.load(thread_id)
    t.reset_unread_count()
    abort(200)