curl https://api-verifier-2.onrender.com/api/users \
-H "Authorization: Bearer <admin-token>"
[
{
"_id": "65a1b2c3d4e5f6g7h8i9j0k1",
"user_id": "sha256hash...",
"firstName": "John",
"lastName": "Doe",
"email": "john@example.com",
"role": "user",
"profilePic": "",
"likedPosts": [],
"createdAt": "2024-01-10T08:00:00.000Z"
},
{
"_id": "65a1b2c3d4e5f6g7h8i9j0k2",
"user_id": "sha256hash...",
"firstName": "Jane",
"lastName": "Smith",
"email": "jane@example.com",
"role": "moderator",
"profilePic": "https://example.com/pic.jpg",
"likedPosts": ["post-id-1", "post-id-2"],
"createdAt": "2024-01-05T12:00:00.000Z"
}
]
Retrieve all users (admin only)
curl https://api-verifier-2.onrender.com/api/users \
-H "Authorization: Bearer <admin-token>"
[
{
"_id": "65a1b2c3d4e5f6g7h8i9j0k1",
"user_id": "sha256hash...",
"firstName": "John",
"lastName": "Doe",
"email": "john@example.com",
"role": "user",
"profilePic": "",
"likedPosts": [],
"createdAt": "2024-01-10T08:00:00.000Z"
},
{
"_id": "65a1b2c3d4e5f6g7h8i9j0k2",
"user_id": "sha256hash...",
"firstName": "Jane",
"lastName": "Smith",
"email": "jane@example.com",
"role": "moderator",
"profilePic": "https://example.com/pic.jpg",
"likedPosts": ["post-id-1", "post-id-2"],
"createdAt": "2024-01-05T12:00:00.000Z"
}
]
Show user object
curl https://api-verifier-2.onrender.com/api/users \
-H "Authorization: Bearer <admin-token>"
[
{
"_id": "65a1b2c3d4e5f6g7h8i9j0k1",
"user_id": "sha256hash...",
"firstName": "John",
"lastName": "Doe",
"email": "john@example.com",
"role": "user",
"profilePic": "",
"likedPosts": [],
"createdAt": "2024-01-10T08:00:00.000Z"
},
{
"_id": "65a1b2c3d4e5f6g7h8i9j0k2",
"user_id": "sha256hash...",
"firstName": "Jane",
"lastName": "Smith",
"email": "jane@example.com",
"role": "moderator",
"profilePic": "https://example.com/pic.jpg",
"likedPosts": ["post-id-1", "post-id-2"],
"createdAt": "2024-01-05T12:00:00.000Z"
}
]