Skip to content

Project Like

Like a specific project.

Interface Information

  • Endpoint: POST /api/projects/:id/like
  • Authentication: Required
  • Content-Type: application/json

Request Headers

ParameterDescription
AuthorizationBearer Token

Path Parameters

ParameterTypeRequiredDescription
idnumberYesProject ID

Request Example

bash
curl -X POST http://localhost:3000/api/projects/1/like \
  -H "Authorization: Bearer your-jwt-token"

Response Example

json
{
  "success": true,
  "message": "Like successful",
  "data": {
    "likeCount": 46
  }
}

Error Responses

HTTP Status CodeDescription
401Not logged in or token invalid
404Project does not exist
400Already liked
500Server error

Limitations

  • Each user can only like the same project once
  • Likes cannot be canceled (contact administrator if needed)