Endpoint
Request body
The UUID of the recipe to add to favorites.
Response
Returns a confirmation message on success.Confirmation string. Value is
"Añadido a favoritos" on success.Error responses
| Status | Error | Description |
|---|---|---|
401 | No autorizado | No active session or invalid session token. |
400 | Database error message | A Supabase insert error occurred. This includes cases where the recipe is already in the user’s favorites (unique constraint violation). |
500 | Error interno | An unexpected server error occurred. |
The
favoritos table enforces uniqueness on the (usuario_id, receta_id) pair. Attempting to add a recipe that is already favorited returns a 400 with a database-level constraint error message.Example request
Example responses
201 Created
401 Unauthorized
400 Duplicate