Files
bookhoard/bruno/user/profile/Get Profile.bru
T
john-okeefe 481adaa71e feat: Implement role-based registration restrictions and reorganize Bruno collection
- Add role-based restrictions to POST /api/auth/register endpoint
- Only admins can create admin accounts if any admin already exists
- First user automatically gets admin role regardless of request
- Regular users can only create user accounts, not admin accounts
- Unauthenticated users can only create first admin, not subsequent admins
- Reorganize Bruno collection into logical subfolders (auth/, admin/, profile/)
- Update documentation to reflect new registration restrictions and security rules

BREAKING CHANGES:
- /api/auth/register now enforces role-based creation restrictions
- Bruno collection reorganized with subfolder structure
2026-01-27 14:15:06 -05:00

41 lines
659 B
Plaintext

meta {
name: Get Profile
type: http
seq: 1
}
get {
url: {{base_url}}/api/auth/profile
body: none
auth: inherit
}
settings {
encodeUrl: true
timeout: 0
}
docs {
## Get User Profile
Retrieves the authenticated user's profile.
**Method:** GET
**Endpoint:** /api/auth/profile
**Authentication:** Required
**Response:**
- `id` (string): User ID
- `email` (string): Email
- `username` (string): Username
- `theme` (string): User theme preference
- `first_name` (string, optional): First name
- `last_name` (string, optional): Last name
**Status Codes:**
- 200: Success
- 401: Unauthorized
}