Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating API endpoint to send/accept friend requests #367

Open
abrahmasandra opened this issue Dec 2, 2023 · 2 comments · May be fixed by #370
Open

Creating API endpoint to send/accept friend requests #367

abrahmasandra opened this issue Dec 2, 2023 · 2 comments · May be fixed by #370
Assignees
Labels
Milestone

Comments

@abrahmasandra
Copy link
Contributor

Summary:

In order for two users to become friends, one user needs to send a friend request to the other user. In ChiGame, this is handled specifically by the FriendInvitation model. A user can create a FriendInvitation and another user can then accept that invitation.

In this issue, we aim to allow a user to make a friend request from the API endpoint: /api/friend-invitations/send/ and accept a specific friend request at friend-invitations/accept/<int:pk>/' where the pk is the id of the specific request.

We will know when this issue is completed when these endpoints work as described above.

@abrahmasandra abrahmasandra added this to the 2023/Sprint 3 milestone Dec 2, 2023
@abrahmasandra abrahmasandra self-assigned this Dec 2, 2023
@abrahmasandra abrahmasandra moved this to In Progress in CMSC 22000 Scrum Board Dec 2, 2023
@Esterello2 Esterello2 self-assigned this Dec 2, 2023
@Esterello2
Copy link

I am creating API Endpoints that deal with handling POST requests for FriendInvitations; the first endpoint is done by first "Sending" a FriendInvitation object, which essentially creates one of these objects with the user pk of both sender and receiver. Then, another endpoint would deal with "Accepting" the invitation, which takes in the FriendInvitation pk, and changes the "accepted" attribute to True if done properly. Then, a ListView for GET requests of all Friend Invitations, pending and accepted.

@Esterello2
Copy link

There seems to be an issue with one of the models (UserProfile query) which I am reaching out to the User/Friend team for

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment