Skip to main content

POST /api/posts/[id]/favorite

Add a post to the authenticated user’s favorites.
Requires authentication.

Response (201)

{
  "message": "Post added to favorites",
  "isFavorited": true
}

DELETE /api/posts/[id]/favorite

Remove a post from favorites.

Response (200)

{
  "message": "Post removed from favorites",
  "isFavorited": false
}