GET /users/me
Description: Get the profile of the authenticated user.
Headers:
Authorization: Bearer <token>
Responses:
200 OK: Returns the user profile404 Not Found: If the user is not found
PUT /users/me
Description: Update the profile of the authenticated user.
Headers:
Authorization: Bearer <token>
Request Body:
{
"name": "string",
"bio": "string"
}Responses:
200 OK: Returns the updated user profile404 Not Found: If the user is not found
GET /users/me/communities
Description: Get the list of communities the authenticated user is part of (implementation coming soon).
Headers:
Authorization: Bearer <token>
Responses:
200 OK: Returns a placeholder message
Note: These endpoints require admin privileges
GET /users/:id
Description: Get the profile of a user by their ID.
Headers:
Authorization: Bearer <token>
Responses:
200 OK: Returns the requested user profile404 Not Found: If the user is not found403 Forbidden: If the requester is not an admin
PUT /admin/users/:id/role
Description: Change the role of a user.
Headers:
Authorization: Bearer <token>
Request Body:
{
"role": "string"
}Responses:
200 OK: Returns the updated user profile404 Not Found: If the user is not found403 Forbidden: If the requester is not an admin