The Likes API exposes a single endpoint that returns every user who has sent you a like but whom you have not yet liked back — meaning no mutual match exists yet. This powers the LikesScreen in the Debuta mobile app, which lets users browse their admirers and decide whether to like them back (creating a match) or ignore them. The server queries theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/desarrolladorandres2026-gif/Native-tailwind/llms.txt
Use this file to discover all available pages before exploring further.
Match collection for documents where:
- The current user is in the
usuariosarray. esMatchisfalse— no mutual match yet.- Another user’s
likerecord points to the current user (like.para === me). - The current user has not sent a like of their own in that document (
like.de !== me).
Endpoint
GET /api/likes
Returns all received likes that have not yet become mutual matches. Authentication:Authorization: Bearer <access_token>
Response 200 OK
Array of received-like objects. Empty array
[] if no pending likes exist.ID of the Match document that recorded this like interaction.
Profile of the user who liked you.
User’s MongoDB
_id (normalised from _id for frontend compatibility).First name.
Last name.
Unique username handle.
Cloudinary photo object with
url and public_id, or null if no photo set.ISO 8601 birth date string used to compute the displayed age.
Whether the user has completed identity verification.
City listed on the user’s profile.
ISO 8601 timestamp of when the like was sent. Falls back to the Match
document’s
createdAt if the like subdocument has no timestamp.Total count of pending likes returned. Equals
likes.length.Error responses
| Status | Description |
|---|---|
401 Unauthorized | Missing or invalid Bearer token |
500 Internal Server Error | Database query failure |
Example
Acting on a like
To like someone back and create a mutual match, callPOST /api/matches/like/:targetId with the usuario.id value from this response:
{ "esMatch": true, ... } and emits a match:nuevo Socket.io event to both users.
The LikesScreen in the mobile app polls this endpoint on focus to refresh the list.
Users who have already been responded to (liked back or disliked) will no longer
appear here because the underlying Match document will either have
esMatch: true
or a dislike entry from the current user.