Exemplo n.º 1
0
def patch_is_hidden(request, thread, value):
    if value:
        allow_hide_thread(request.user, thread)
        moderation.hide_thread(request, thread)
    else:
        allow_unhide_thread(request.user, thread)
        moderation.unhide_thread(request, thread)

    return {'is_hidden': thread.is_hidden}
Exemplo n.º 2
0
def patch_is_hidden(request, thread, value):
    if value:
        allow_hide_thread(request.user, thread)
        moderation.hide_thread(request, thread)
    else:
        allow_unhide_thread(request.user, thread)
        moderation.unhide_thread(request, thread)

    return {'is_hidden': thread.is_hidden}