Пример #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],
    )
Пример #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,
    )
Пример #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],
    )
Пример #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],
    )
Пример #5
0
def posts(request, community_id):
    return handle_methods(
        request,
        POST=post_handler.create_post,
        GET=post_handler.show_posts,
        args=[community_id],
    )
Пример #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],
    )
Пример #7
0
def leaderboard(request):
    return handle_methods(
        request,
        GET=user_controller.get_leaderboard,
    )
Пример #8
0
def feed(request):
    return handle_methods(
        request,
        GET=user_controller.get_feed,
    )
Пример #9
0
def users(request):
    return handle_methods(
        request,
        POST=user_controller.user_register,
    )
Пример #10
0
def send_email(request):
    return handle_methods(request, POST=user_controller.send_email)
Пример #11
0
def reset_password(request):
    return handle_methods(request, POST=user_controller.reset_password)
Пример #12
0
def comments(request, community_id, post_id):
    return handle_methods(
        request,
        POST=comment_controller.make_comment,
        args=[community_id, post_id],
    )
Пример #13
0
def post(request, community_id, post_id):
    return handle_methods(
        request,
        GET=post_handler.show_post,
        args=[community_id, post_id],
    )
Пример #14
0
def community_leave(request, community_id):
    return handle_methods(
        request,
        POST=community_controller.leave_community,
        args=[community_id],
    )
Пример #15
0
def users_individual(request, user_id):
    return handle_methods(
        request,
        GET=user_controller.get_user,
        args=[user_id],
    )
Пример #16
0
def logout(request):
    return handle_methods(
        request,
        POST=user_controller.user_logout,
    )
Пример #17
0
def users_share_code(request):
    return handle_methods(
        request,
        GET=user_controller.get_share_code,
        POST=user_controller.update_share_code,
    )
Пример #18
0
def communities(request):
    return handle_methods(
        request,
        POST=community_controller.create_new,
        GET=community_controller.list_communities,
    )