Exemplo n.º 1
0
def comment_likes(request, community_id, post_id, comment_id):
    return handle_methods(
        request,
        POST=comment_controller.like_comment,
        DELETE=comment_controller.unlike_comment,
        args=[community_id, post_id, comment_id],
    )
Exemplo n.º 2
0
def users_me(request):
    return handle_methods(
        request,
        GET=user_controller.get_user(request, request.user.id),
        PUT=user_controller.update_me,
        DELETE=user_controller.delete_me,
    )
Exemplo n.º 3
0
def comment_approve(request, community_id, post_id, comment_id):
    return handle_methods(
        request,
        POST=comment_controller.approve_comment,
        DELETE=comment_controller.disapprove_comment,
        args=[community_id, post_id, comment_id],
    )
Exemplo n.º 4
0
def post_likes(request, community_id, post_id):
    return handle_methods(
        request,
        POST=post_handler.like_post,
        DELETE=post_handler.unlike_post,
        args=[community_id, post_id],
    )
Exemplo n.º 5
0
def posts(request, community_id):
    return handle_methods(
        request,
        POST=post_handler.create_post,
        GET=post_handler.show_posts,
        args=[community_id],
    )
Exemplo n.º 6
0
def community(request, community_id):
    return handle_methods(
        request,
        POST=community_controller.join_community,
        GET=community_controller.get_community,
        DELETE=community_controller.delete_community,
        args=[community_id],
    )
Exemplo n.º 7
0
def leaderboard(request):
    return handle_methods(
        request,
        GET=user_controller.get_leaderboard,
    )
Exemplo n.º 8
0
def feed(request):
    return handle_methods(
        request,
        GET=user_controller.get_feed,
    )
Exemplo n.º 9
0
def users(request):
    return handle_methods(
        request,
        POST=user_controller.user_register,
    )
Exemplo n.º 10
0
def send_email(request):
    return handle_methods(request, POST=user_controller.send_email)
Exemplo n.º 11
0
def reset_password(request):
    return handle_methods(request, POST=user_controller.reset_password)
Exemplo n.º 12
0
def comments(request, community_id, post_id):
    return handle_methods(
        request,
        POST=comment_controller.make_comment,
        args=[community_id, post_id],
    )
Exemplo n.º 13
0
def post(request, community_id, post_id):
    return handle_methods(
        request,
        GET=post_handler.show_post,
        args=[community_id, post_id],
    )
Exemplo n.º 14
0
def community_leave(request, community_id):
    return handle_methods(
        request,
        POST=community_controller.leave_community,
        args=[community_id],
    )
Exemplo n.º 15
0
def users_individual(request, user_id):
    return handle_methods(
        request,
        GET=user_controller.get_user,
        args=[user_id],
    )
Exemplo n.º 16
0
def logout(request):
    return handle_methods(
        request,
        POST=user_controller.user_logout,
    )
Exemplo n.º 17
0
def users_share_code(request):
    return handle_methods(
        request,
        GET=user_controller.get_share_code,
        POST=user_controller.update_share_code,
    )
Exemplo n.º 18
0
def communities(request):
    return handle_methods(
        request,
        POST=community_controller.create_new,
        GET=community_controller.list_communities,
    )