test(bruno): update API collections for consolidated endpoints
Add collections for Delete User, Reset User Password, and Update User endpoints. Remove obsolete collections for individual profile update operations. Update Update Profile collection to reflect new consolidated API structure.
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
info:
|
||||
name: Update User
|
||||
type: http
|
||||
seq: 10
|
||||
http:
|
||||
method: PUT
|
||||
url: '{{base_url}}/api/auth/profile/{{user_id}}'
|
||||
auth: inherit
|
||||
body:
|
||||
type: json
|
||||
jsonBody: |-
|
||||
{
|
||||
"username": "newusername",
|
||||
"email": "newemail@example.com",
|
||||
"role": "admin"
|
||||
}
|
||||
|
||||
docs: |-
|
||||
## Admin Update User
|
||||
|
||||
Admin-only endpoint to update another user's profile.
|
||||
|
||||
**Method:** PUT
|
||||
|
||||
**Endpoint:** /api/auth/profile/:id
|
||||
|
||||
**Authentication:** Required (Admin Bearer token)
|
||||
|
||||
**Request Body:**
|
||||
- `username` (string, optional): New username
|
||||
- `email` (string, optional): New email
|
||||
- `first_name` (string, optional): First name
|
||||
- `last_name` (string, optional): Last name
|
||||
- `theme` (string, optional): Theme preference
|
||||
- `role` (string, optional): Role ("user" or "admin") - admin only
|
||||
|
||||
**Status Codes:**
|
||||
- 200: Success
|
||||
- 400: Invalid role or cannot demote last admin
|
||||
- 403: Not an admin
|
||||
- 404: User not found
|
||||
- 409: Username or email already taken
|
||||
Reference in New Issue
Block a user