feat: Add UserController and user-related DTOs for user management functionality

This commit is contained in:
Marek Lesko
2025-11-07 20:49:39 +00:00
parent 441b00b510
commit 74dfb95d99
4 changed files with 612 additions and 1 deletions

70
Api/User.http Normal file
View File

@@ -0,0 +1,70 @@
### User Controller API Tests
@baseUrl = http://localhost:5000
@authToken = YOUR_JWT_TOKEN_HERE
### Get all users with pagination
GET {{baseUrl}}/api/user?page=1&pageSize=10
Authorization: Bearer {{authToken}}
### Get all users with search
GET {{baseUrl}}/api/user?search=john&isActive=true
Authorization: Bearer {{authToken}}
### Get specific user by ID
GET {{baseUrl}}/api/user/1
Authorization: Bearer {{authToken}}
### Get current user profile
GET {{baseUrl}}/api/user/me
Authorization: Bearer {{authToken}}
### Create a new user
POST {{baseUrl}}/api/user
Authorization: Bearer {{authToken}}
Content-Type: application/json
{
"email": "newuser@example.com",
"firstName": "John",
"lastName": "Doe",
"profilePictureUrl": "https://example.com/profile.jpg",
"isActive": true
}
### Update a user
PUT {{baseUrl}}/api/user/1
Authorization: Bearer {{authToken}}
Content-Type: application/json
{
"firstName": "Updated John",
"lastName": "Updated Doe",
"isActive": true
}
### Update current user profile
PUT {{baseUrl}}/api/user/me
Authorization: Bearer {{authToken}}
Content-Type: application/json
{
"firstName": "My Updated Name",
"profilePictureUrl": "https://example.com/new-profile.jpg"
}
### Soft delete user (deactivate)
DELETE {{baseUrl}}/api/user/1
Authorization: Bearer {{authToken}}
### Reactivate a soft-deleted user
POST {{baseUrl}}/api/user/1/reactivate
Authorization: Bearer {{authToken}}
### Permanently delete user
DELETE {{baseUrl}}/api/user/1/permanent
Authorization: Bearer {{authToken}}
### Get user statistics
GET {{baseUrl}}/api/user/statistics
Authorization: Bearer {{authToken}}