MuscleMate / BackEnd

API for MuscleMate app
3 stars 0 forks source link

Add POST add friend request #28

Closed VEXI19 closed 5 months ago

VEXI19 commented 5 months ago

Create POST request responsible for accepting friend request. In practice, it's just moving userID from sentFriendsRequest and receivedFriendsRequests array to friends array.

Example request

API_URL/friends/accept

Body

Response

No content in response necessary. Just 204 (no content).

JakubKostrzewa20 commented 5 months ago

Where is ID of a user who's accepting the request? @VEXI19

VEXI19 commented 5 months ago

it's added in authenticate middleware to the body of a request in a field user